aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toolsrc/src/vcpkg/base/files.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp
index b06b625a5..2d82e1df1 100644
--- a/toolsrc/src/vcpkg/base/files.cpp
+++ b/toolsrc/src/vcpkg/base/files.cpp
@@ -1174,7 +1174,11 @@ namespace vcpkg::Files
virtual std::vector<fs::path> find_from_PATH(const std::string& name) const override
{
+#if defined(_WIN32)
static constexpr StringLiteral EXTS[] = {".cmd", ".exe", ".bat"};
+#else // ^^^ defined(_WIN32) // !defined(_WIN32) vvv
+ static constexpr StringLiteral EXTS[] = {""};
+#endif // ^^^!defined(_WIN32)
auto paths = Strings::split_paths(System::get_environment_variable("PATH").value_or_exit(VCPKG_LINE_INFO));
std::vector<fs::path> ret;