diff options
| author | Enrico Granata <egranata@apple.com> | 2015-11-03 01:47:19 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2015-11-03 01:47:19 +0000 |
| commit | c0d8f0ca7d8f620e19447856e88c1131c538be78 (patch) | |
| tree | 3260253c67a022944116bec8d11c81c34b8cf67c | |
| parent | 3181c2ef723e4d196f2b6c74b13fda9ae61ba3b1 (diff) | |
| download | bcm5719-llvm-c0d8f0ca7d8f620e19447856e88c1131c538be78.tar.gz bcm5719-llvm-c0d8f0ca7d8f620e19447856e88c1131c538be78.zip | |
Emit an error message if the current working directory does not exist when the user is trying to launch argdumper to do shell expansion
llvm-svn: 251882
| -rw-r--r-- | lldb/source/Host/macosx/Host.mm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Host/macosx/Host.mm b/lldb/source/Host/macosx/Host.mm index 57be7d862d7..8899b9c675c 100644 --- a/lldb/source/Host/macosx/Host.mm +++ b/lldb/source/Host/macosx/Host.mm @@ -1371,7 +1371,13 @@ Host::ShellExpandArguments (ProcessLaunchInfo &launch_info) int status; std::string output; - RunShellCommand(expand_command, launch_info.GetWorkingDirectory(), &status, nullptr, &output, 10); + FileSpec cwd(launch_info.GetWorkingDirectory()); + if (!cwd.Exists()) + { + error.SetErrorStringWithFormat("cwd does not exist; cannot launch with shell argument expansion"); + return error; + } + RunShellCommand(expand_command, cwd, &status, nullptr, &output, 10); if (status != 0) { |

