Skip to content

Commit

Permalink
Windows, launcher: support python/bash toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorcloudy committed May 22, 2019
1 parent 6f52cf3 commit 4e2762f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tools/launcher/bash_launcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ static constexpr const char* BASH_BIN_PATH = "bash_bin_path";

ExitCode BashBinaryLauncher::Launch() {
wstring bash_binary = this->GetLaunchInfoByKey(BASH_BIN_PATH);

// Rlocation returns the original path if bash_binary is an absolute path.
bash_binary = this->Rlocation(bash_binary, true);

if (DoesFilePathExist(bash_binary.c_str())) {
wstring bash_bin_dir = GetParentDirFromPath(bash_binary);
wstring path_env;
Expand Down
4 changes: 4 additions & 0 deletions src/tools/launcher/python_launcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ static constexpr const char* WINDOWS_STYLE_ESCAPE_JVM_FLAGS = "escape_args";

ExitCode PythonBinaryLauncher::Launch() {
wstring python_binary = this->GetLaunchInfoByKey(PYTHON_BIN_PATH);

// Rlocation returns the original path if python_binary is an absolute path.
python_binary = this->Rlocation(python_binary, true);

// If specified python binary path doesn't exist, then fall back to
// python.exe and hope it's in PATH.
if (!DoesFilePathExist(python_binary.c_str())) {
Expand Down

0 comments on commit 4e2762f

Please sign in to comment.