forked from OSchip/llvm-project
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
This commit is contained in:
parent
3181c2ef72
commit
c0d8f0ca7d
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue