[ https://issues.apache.org/jira/browse/CB-6377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13966537#comment-13966537 ]
ASF GitHub Bot commented on CB-6377: ------------------------------------ Github user sgrebnov commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/161#discussion_r11533344 --- Diff: src/superspawn.js --- @@ -24,6 +24,8 @@ var _ = require('underscore'); var Q = require('q'); var shell = require('shelljs'); var events = require('./events'); +var iswin32 = process.platform == 'win32'; +var wrapcmd = iswin32 && require('os').release().split('.')[0] < 6; --- End diff -- No, cli does not work; this patch is required (I think it is super useful). Win8.1 x64. I have the following hook file so cordova-cli is trying to run it during build. The file is located at project with **whitespace** in the name. c:\temp\sql2 app\hooks\before_build\cordova-plugin-websql3.bat **cordova-cli from npm(3.4.1-0.1.0)** c:\temp\sql2 app>cordova build -d Running command: "c:\temp\sql2 app\hooks\before_build\cordova-plugin-websql3.bat" "c:\temp\sql2 app" 'c:\temp\sql2' is not recognized as an internal or external command, operable program or batch file. The error above is due to the following reason: cli shows command in output as escaped, but actually it is not. So if I escape it, I receive the following error - I believe this is because spawn can't run bat file directly. c:\temp\sql2 app>cordova build -d Running command: "c:\temp\sql2 app\hooks\before_build\cordova-plugin-websql3.bat" "c:\temp\sql2 app" Command finished with error code ENOENT: c:\temp\sql2 app\hooks\before_build\cordova-plugin-websql3.bat c:\temp\sql2 app Hook failed with error code ENOENT: c:\temp\sql2 app\hooks\before_build\cordova- plugin-websql3.bat **w/ path** - works the same since patch is not applied due to wrapcmd = False (seee below) c:\temp\sql2 app>cordova build -d Running command: "c:\temp\sql2 app\hooks\before_build\cordova-plugin-websql3.bat" "c:\temp\sql2 app" 'c:\temp\sql2' is not recognized as an internal or external command, operable program or batch file. **w/ path and w/o check for require('os').release().split('.')[0] < 6** (manually removed) c:\temp\sql2 app>cordova build -d Running command: cmd "/s /c ""c:\temp\sql2 app\hooks\before_build\cordova-plugin-websql3.bat" "c:\temp\sql2 app""" "SUCCESS" > CLI is unable to create a project when there are spaces in the path > ------------------------------------------------------------------- > > Key: CB-6377 > URL: https://issues.apache.org/jira/browse/CB-6377 > Project: Apache Cordova > Issue Type: Bug > Components: CLI > Affects Versions: 3.4.0 > Reporter: JennyGee > Assignee: Josh Soref > Priority: Critical > > Unable to create a project where there are spaces in the path. > C:\Program Files\BlackBerry\BB10 WebWorks SDK > 2.1.0.3\webworks-cli\node_modules\ > wrench\lib\wrench.js:249 > if (e.code !== 'EEXIST') throw e; > ^ > Error: ENOENT, no such file or directory 'C:\Documents and > Settings\IEUser\.cord > ova\lib\blackberry10\cordova\v2.1.0.3' > at Object.fs.mkdirSync (fs.js:642:18) > at Object.exports.copyDirSyncRecursive (C:\Program Files\BlackBerry\BB10 > Web > Works SDK 2.1.0.3\webworks-cli\node_modules\wrench\lib\wrench.js:246:12) > at Object._self.fetchBlackBerry (C:\Program Files\BlackBerry\BB10 > WebWorks S > DK 2.1.0.3\webworks-cli\lib\utils\utils.js:59:20) > at new CLI (C:\Program Files\BlackBerry\BB10 WebWorks SDK > 2.1.0.3\webworks-c > li\lib\cli.js:48:19) > at Object.<anonymous> (C:\Program Files\BlackBerry\BB10 WebWorks SDK > 2.1.0.3 > \webworks-cli\bin\webworks:4:16) > at Module._compile (module.js:456:26) > at Object.Module._extensions..js (module.js:474:10) > at Module.load (module.js:356:32) > at Function.Module._load (module.js:312:12) > at Function.Module.runMain (module.js:497:10) > Looking at the source code, it appears that > https://issues.apache.org/jira/browse/CB-6323 broke > https://issues.apache.org/jira/browse/CB-6306 -- This message was sent by Atlassian JIRA (v6.2#6252)