Commit 51f399ca authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

Fix for run command on windows. If you specify command in quotes but not full...

Fix for run command on windows. If you specify command in quotes but not full path, it should still work
parent 088709e9
......@@ -1508,7 +1508,11 @@ bool cmSystemTools::RunCommand(const char* command,
std::string shortCmd;
std::string cmd = quoted.match(1);
std::string args = quoted.match(2);
if(!cmSystemTools::GetShortPath(cmd.c_str(), shortCmd))
if(! cmSystemTools::FileExists(cmd.c_str()) )
{
shortCmd = cmd;
}
else if(!cmSystemTools::GetShortPath(cmd.c_str(), shortCmd))
{
cmSystemTools::Error("GetShortPath failed for " , cmd.c_str());
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment