Skip to content

Commit 9c5ebed

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

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎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-
functionrun(ionic,argv){
62+
functionrun(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
returnnpmScripts.hasIonicScript('serve')
6969
.then(function(hasServeCommand){
7070
if(hasServeCommand){
71-
returnnpmScripts.runIonicScript('serve',argv);
71+
returnnpmScripts.runIonicScript('serve',rawCliArguments.slice(1));
7272
}else{
7373
returnrunServer(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
varscriptName=getScriptName(name);
2424
varq=Q.defer();
2525

26-
varscriptSpawn=spawn('npm',['run',scriptName].concat(argv||[]),{stdio: 'inherit'})
26+
varscriptSpawn=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)