diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2018-04-06 15:12:26 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2018-04-06 19:31:13 -0700 |
| commit | 5d96ff1229d3e93f901215f054225d2859b07f5f (patch) | |
| tree | e84f6ecd260a296a5968f27faa532835bef41a5c /toolsrc/src | |
| parent | 80f16f769e981b4a52ae841dd71f73009866133c (diff) | |
| download | vcpkg-5d96ff1229d3e93f901215f054225d2859b07f5f.tar.gz vcpkg-5d96ff1229d3e93f901215f054225d2859b07f5f.zip | |
[fetch] Don't attempt to download on unknown OSes
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/vcpkg/commands.fetch.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 7cce312dd..1d2c67d67 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -47,10 +47,13 @@ namespace vcpkg::Commands::Fetch static constexpr StringLiteral OS_STRING = "windows"; #elif defined(__APPLE__) static constexpr StringLiteral OS_STRING = "osx"; -#else // assume linux +#elif defined(__linux__) static constexpr StringLiteral OS_STRING = "linux"; +#else + return ToolData{}; #endif +#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) static const std::string XML_VERSION = "2"; static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; @@ -137,6 +140,7 @@ namespace vcpkg::Commands::Fetch paths.downloads / archive_name.value_or(exe_relative_path), tool_dir_path, sha512}; +#endif } static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd, |
