cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agrieve <>
Subject [GitHub] cordova-cli pull request: CB-6377 Handle spaces in paths for cmd r...
Date Mon, 31 Mar 2014 18:57:43 GMT
Github user agrieve commented on a diff in the pull request:
    --- Diff: src/superspawn.js ---
    @@ -60,11 +60,11 @@ exports.spawn = function(cmd, args, opts) {
         var spawnOpts = {};
         var d = Q.defer();
    -    if (process.platform.slice(0, 3) == 'win') {
    +    if (process.platform == 'win32') {
             cmd = resolveWindowsExe(cmd);
             // If we couldn't find the file, likely we'll end up failing,
             // but for things like "del", cmd will do the trick.
    -        if (!fs.existsSync(cmd)) {
    +        if (path.extname(cmd) !== 'exe' || !fs.existsSync(cmd)) {
    --- End diff --
    extname returns ".exe", so this is just using cmd always.
    I tested that spawn executes .bat / .cmd files so long as you use the full path to them.
    Could you add in a comment saying why we'd want to go through cmd anyways (it fixes the
arg parsing?)

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message