forked from qt-creator/qt-creator
WebAssembly: Support emsdk path with spaces on Linux/macOS
The command passed to bash as argument needs to be quoted. Task-number: QTCREATORBUG-29981 Change-Id: I0e91ab4c088f8cd4e5a2df82604ea86cf73369fc Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -51,7 +51,9 @@ static QString emSdkEnvOutput(const FilePath &sdkRoot)
|
|||||||
emSdkEnv.setCommand(CommandLine(scriptFile));
|
emSdkEnv.setCommand(CommandLine(scriptFile));
|
||||||
} else {
|
} else {
|
||||||
// File needs to be source'd, not executed.
|
// File needs to be source'd, not executed.
|
||||||
emSdkEnv.setCommand({sdkRoot.withNewPath("bash"), {"-c", ". " + scriptFile.path()}});
|
CommandLine cmd{sdkRoot.withNewPath("bash"), {"-c"}};
|
||||||
|
cmd.addCommandLineAsSingleArg({".", {scriptFile.path()}});
|
||||||
|
emSdkEnv.setCommand(cmd);
|
||||||
}
|
}
|
||||||
emSdkEnv.runBlocking();
|
emSdkEnv.runBlocking();
|
||||||
const QString result = emSdkEnv.allOutput();
|
const QString result = emSdkEnv.allOutput();
|
||||||
|
Reference in New Issue
Block a user