Skip to content
This repository has been archived by the owner on Dec 13, 2019. It is now read-only.

Commit

Permalink
fix: Cannot use 'quasar wrap' on Windows
Browse files Browse the repository at this point in the history
This closes #1
  • Loading branch information
rstoenescu committed Jun 11, 2016
1 parent 4fd333c commit 1e8015f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions lib/cmds/wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

var
fs = require('../file-system'),
spawn = require('child_process').spawn
spawn = require('child_process').spawn,
windowsPlatfrom = /^win/.test(process.platform)
;

function execute(opts) {
spawn('cordova', opts.args, {cwd: opts.cwd, stdio: 'inherit'})
var
executable = windowsPlatfrom ? 'cmd.exe' : 'cordova',
args = (windowsPlatfrom ? ['/c', 'cordova'] : []).concat(opts.args)
;

spawn(executable, args, {cwd: opts.cwd, stdio: 'inherit'})
.on('error', function(err) {
opts.log(err);
opts.log.error('You need ' + 'Cordova'.yellow + ' globally installed (npm install -g cordova).\n');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quasar-cli",
"version": "0.1.1",
"version": "0.1.2",
"description": "Quasar Framework CLI",
"preferGlobal": true,
"bin": {
Expand Down

0 comments on commit 1e8015f

Please sign in to comment.