mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 02:53:02 +08:00
[fetch] Don't attempt to download on unknown OSes
This commit is contained in:
parent
80f16f769e
commit
5d96ff1229
@ -47,10 +47,13 @@ namespace vcpkg::Commands::Fetch
|
|||||||
static constexpr StringLiteral OS_STRING = "windows";
|
static constexpr StringLiteral OS_STRING = "windows";
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
static constexpr StringLiteral OS_STRING = "osx";
|
static constexpr StringLiteral OS_STRING = "osx";
|
||||||
#else // assume linux
|
#elif defined(__linux__)
|
||||||
static constexpr StringLiteral OS_STRING = "linux";
|
static constexpr StringLiteral OS_STRING = "linux";
|
||||||
|
#else
|
||||||
|
return ToolData{};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__)
|
||||||
static const std::string XML_VERSION = "2";
|
static const std::string XML_VERSION = "2";
|
||||||
static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml";
|
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),
|
paths.downloads / archive_name.value_or(exe_relative_path),
|
||||||
tool_dir_path,
|
tool_dir_path,
|
||||||
sha512};
|
sha512};
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd,
|
static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd,
|
||||||
|
Loading…
Reference in New Issue
Block a user