@@ -20,7 +20,9 @@ var fs = require('fs');
20var pathToThisFile = fs.realpathSync(process.argv[1]);
20var pathToThisFile = fs.realpathSync(process.argv[1]);
22download(pathToThisFile, function() {
22download(pathToThisFile, function() {
23+ // Need double quotes and { shell: true } when there are spaces in the path on windows:
24+ // https://github.com/nodejs/node/issues/7367#issuecomment-229721296
23 child_process
25 child_process
24− .spawn(pathToThisFile, process.argv.slice(2), { stdio: 'inherit' })
26+ .spawn('"' + pathToThisFile + '"', process.argv.slice(2), { stdio: 'inherit', shell: true })
25 .on('exit', process.exit);
27 .on('exit', process.exit);