SWDEV-404873 - Add double quotes that handles space in path for windows OS. (#371)
Change-Id: I4752072914aded5e39105913f5bd79fcaf4b499b
Este cometimento está contido em:
cometido por
GitHub
ascendente
04080c2e2e
cometimento
573aefb652
@@ -85,6 +85,10 @@ class SpawnProc {
|
||||
INFO("Testing that capture file does not exist already: " << tmpFileName);
|
||||
REQUIRE(!fs::exists(tmpFileName));
|
||||
}
|
||||
if (TestContext::get().isWindows()) {
|
||||
exeName = (exeName.find(" ", 0) == std::string::npos) ? exeName : ("\"" + exeName + "\"");
|
||||
tmpFileName = (tmpFileName.find(" ", 0) == std::string::npos) ? tmpFileName : ("\"" + tmpFileName + "\"");
|
||||
}
|
||||
}
|
||||
|
||||
int run(std::string commandLineArgs = "") {
|
||||
@@ -100,6 +104,9 @@ class SpawnProc {
|
||||
execCmd += " > ";
|
||||
execCmd += tmpFileName;
|
||||
}
|
||||
if (TestContext::get().isWindows()) {
|
||||
execCmd = (execCmd.find(" ", 0) == std::string::npos) ? execCmd : ("\"" + execCmd + "\"");
|
||||
}
|
||||
auto res = std::system(execCmd.c_str());
|
||||
|
||||
if (captureOutput) {
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador