diff options
-rw-r--r-- | lldb/source/Host/macosx/objcxx/Host.mm | 11 | ||||
-rw-r--r-- | lldb/source/Host/windows/Host.cpp | 10 |
2 files changed, 16 insertions, 5 deletions
diff --git a/lldb/source/Host/macosx/objcxx/Host.mm b/lldb/source/Host/macosx/objcxx/Host.mm index 92aa4778fc6..d4c516d4659 100644 --- a/lldb/source/Host/macosx/objcxx/Host.mm +++ b/lldb/source/Host/macosx/objcxx/Host.mm @@ -1366,9 +1366,14 @@ Status Host::ShellExpandArguments(ProcessLaunchInfo &launch_info) { } bool run_in_default_shell = true; bool hide_stderr = true; - RunShellCommand(expand_command, cwd, &status, nullptr, &output, - std::chrono::seconds(10), run_in_default_shell, - hide_stderr); + Status e = RunShellCommand(expand_command, cwd, &status, nullptr, &output, + std::chrono::seconds(10), run_in_default_shell, + hide_stderr); + + if (e.Fail()) { + error.SetErrorString(e.AsCString()); + return error; + } if (status != 0) { error.SetErrorStringWithFormat("lldb-argdumper exited with error %d", diff --git a/lldb/source/Host/windows/Host.cpp b/lldb/source/Host/windows/Host.cpp index 19be271e831..1c6512bb348 100644 --- a/lldb/source/Host/windows/Host.cpp +++ b/lldb/source/Host/windows/Host.cpp @@ -226,8 +226,14 @@ Status Host::ShellExpandArguments(ProcessLaunchInfo &launch_info) { int status; std::string output; std::string command = expand_command.GetString(); - RunShellCommand(command.c_str(), launch_info.GetWorkingDirectory(), &status, - nullptr, &output, std::chrono::seconds(10)); + Status e = + RunShellCommand(command.c_str(), launch_info.GetWorkingDirectory(), + &status, nullptr, &output, std::chrono::seconds(10)); + + if (e.Fail()) { + error.SetErrorString(e.AsCString()); + return error; + } if (status != 0) { error.SetErrorStringWithFormat("lldb-argdumper exited with error %d", |