CLI: fix execute command, quote argument that contains spaces
This commit is contained in:
parent
d23fd26ce0
commit
dc6f0740c1
|
@ -1176,6 +1176,9 @@ bool CppCheckExecutor::executeCommand(std::string exe, std::vector<std::string>
|
|||
for (const std::string &arg : args) {
|
||||
if (!joinedArgs.empty())
|
||||
joinedArgs += " ";
|
||||
if (arg.find(" ") != std::string::npos)
|
||||
joinedArgs += '"' + arg + '"';
|
||||
else
|
||||
joinedArgs += arg;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue