Skip to content

Commit

Permalink
Keep PATHEXT
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 23, 2024
1 parent aedd663 commit 5ce178e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cpp/src/arrow/testing/process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,11 @@ class Process::Impl {
// Search the current executable directory as fallback.
ARROW_ASSIGN_OR_RAISE(auto current_exe, ResolveCurrentExecutable());
#ifdef BOOST_PROCESS_HAVE_V2
std::unordered_map<process::environment::key, process::environment::value> env = {
{"PATH", current_exe.parent_path().string()},
};
std::unordered_map<process::environment::key, process::environment::value> env;
for (const auto& kv : process::environment::current()) {
env[kv.key()] = process::environment::value(kv.value());
}
env["PATH"] = process::environment::value(current_exe.parent_path());
executable_ = process::environment::find_executable(name, env);
#else
executable_ = process::search_path(name, {current_exe.parent_path()});
Expand Down

0 comments on commit 5ce178e

Please sign in to comment.