Skip to content

Commit 9c5ebed

Browse files
committed
fix(): ensure params are passed correctly to app-scripts
1 parent 3fde646 commit 9c5ebed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/ionic/serve.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var settings = {
5959
isProjectTask: true
6060
};
6161

62-
function run(ionic, argv) {
62+
function run(ionic, argv, rawCliArguments) {
6363

6464
/**
6565
* Before running the internal server check to see if npmscripts has
@@ -68,7 +68,7 @@ function run(ionic, argv) {
6868
return npmScripts.hasIonicScript('serve')
6969
.then(function(hasServeCommand) {
7070
if (hasServeCommand) {
71-
return npmScripts.runIonicScript('serve', argv);
71+
return npmScripts.runIonicScript('serve', rawCliArguments.slice(1));
7272
} else {
7373
return runServer(argv);
7474
}

lib/utils/npmScripts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function runIonicScript(name, argv) {
2323
var scriptName = getScriptName(name);
2424
var q = Q.defer();
2525

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

0 commit comments

Comments
 (0)