Skip to content

Commit d741d3f

Browse files
Merge pull request #267 from sylveon/sylveon/quotes
Add quotes around run command
2 parents d53feb5 + 95d69f2 commit d741d3f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

libs/odmRunner.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,15 @@ module.exports = {
3030
assert(projectName !== undefined, "projectName must be specified");
3131
assert(options["project-path"] !== undefined, "project-path must be defined");
3232

33-
const command = path.join(config.odm_path, os.platform() === "win32" ? "run.bat" : "run.sh"),
33+
let command = path.join(config.odm_path, os.platform() === "win32" ? "run.bat" : "run.sh"),
3434
params = [];
3535

36+
if (os.platform() === "win32"){
37+
// On Windows, we need to add quotes around the file path
38+
// otherwise it doesn't work when there are spaces in the path
39+
command = `"${command}"`;
40+
}
41+
3642
for (var name in options){
3743
let value = options[name];
3844

0 commit comments

Comments
 (0)