Skip to content

Commit

Permalink
Fix deploy.js for use on Windows machines with spaces in path by esca…
Browse files Browse the repository at this point in the history
…ping all arguments to shell commands

Enyo-DCO-1.1-Signed-Off-By: Ben Combee (ben.combee@palm.com)
  • Loading branch information
unwiredben committed Nov 27, 2012
1 parent fb50b39 commit c3a4965
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/deploy.js
Expand Up @@ -32,7 +32,7 @@ the `-o` flag).
* `icon.png`, the application icon
* `assets/`holds the static application assets, such as images,
videos... etc.
*/

// Load dependencies
Expand Down Expand Up @@ -76,7 +76,7 @@ var node = process.argv[0],
buildDir = path.resolve(sourceDir, "build"),
name = path.basename(sourceDir),
outDir = path.resolve(sourceDir, 'deploy', name),
less = true, // LESS compilation, turned on by default
less = true, // LESS compilation, turned on by default
verbose = false;

function printUsage() {
Expand Down Expand Up @@ -115,7 +115,7 @@ var opt = nopt(/*knownOpts*/ {
"h": "--help",
"?": "--help"
}, process.argv /*args*/, 2 /*slice*/);

if (opt.help) {
printUsage();
process.exit(1);
Expand Down Expand Up @@ -145,7 +145,7 @@ if (verbose) console.log("Using: less=" + less);
// utils

function run(args) {
var command = args.join(' ');
var command = '"' + args.join('" "') + '"';
var report;
if (verbose) console.log("Running: '", command, "' from '", process.cwd(), "'");
report = shell.exec(command, { silent: true });
Expand Down

0 comments on commit c3a4965

Please sign in to comment.