Skip to content

Commit

Permalink
fix(): ensure params are passed correctly to app-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jthoms1 committed Nov 10, 2016
1 parent 3fde646 commit 9c5ebed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/ionic/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var settings = {
isProjectTask: true
};

function run(ionic, argv) {
function run(ionic, argv, rawCliArguments) {

/**
* Before running the internal server check to see if npmscripts has
Expand All @@ -68,7 +68,7 @@ function run(ionic, argv) {
return npmScripts.hasIonicScript('serve')
.then(function(hasServeCommand) {
if (hasServeCommand) {
return npmScripts.runIonicScript('serve', argv);
return npmScripts.runIonicScript('serve', rawCliArguments.slice(1));
} else {
return runServer(argv);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/npmScripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function runIonicScript(name, argv) {
var scriptName = getScriptName(name);
var q = Q.defer();

var scriptSpawn = spawn('npm', ['run', scriptName].concat(argv || []), { stdio: 'inherit' })
var scriptSpawn = spawn('npm', ['run', scriptName, '--'].concat(argv || []), { stdio: 'inherit' })
.on('error', function(err) {
log.debug('Spawn command', scriptName, 'failed');
q.reject('Unable to run spawn command ' + err);
Expand Down

0 comments on commit 9c5ebed

Please sign in to comment.