Fix: installation / launch commands workflow

This commit is contained in:
2015-12-07 15:57:48 +00:00
parent 435201b669
commit bd20f6f90b

View File

@@ -59,9 +59,11 @@ CommandRunner = {
if( bundle.project.commands ) { if( bundle.project.commands ) {
bundle.script = bundle.project.commands.split('\n'); bundle.script = bundle.project.commands.split('\n');
CommandRunner.commands(bundle, callback); CommandRunner.commands(bundle, callback);
} else if( bundle.project.run ) {
CommandRunner.launch(bundle, callback);
} else if( callback ) { } else if( callback ) {
callback(); callback();
} }
} else if( callback ) { } else if( callback ) {
callback(); callback();
} }
@@ -90,8 +92,6 @@ CommandRunner = {
bundle.counter++; bundle.counter++;
if( bundle.counter >= bundle.script.length ) { if( bundle.counter >= bundle.script.length ) {
if( bundle.project.run ) { if( bundle.project.run ) {
bundle.script = [bundle.project.run];
bundle.counter = 0;
CommandRunner.launch(bundle, callback); CommandRunner.launch(bundle, callback);
} else { } else {
callback(); callback();
@@ -103,7 +103,7 @@ CommandRunner = {
}, },
launch: function(bundle, callback = undefined) { launch: function(bundle, callback = undefined) {
var command = bundle.script[bundle.counter], var command = bundle.project.run,
customs = {'%CWD%': bundle.project._id}, customs = {'%CWD%': bundle.project._id},
options = { options = {
cwd: replace('%ROOT_CWD%/%CWD%', customs), cwd: replace('%ROOT_CWD%/%CWD%', customs),