make sure that process exits ok

This commit is contained in:
Philipp Kunz 2016-05-30 03:43:15 +02:00
parent 61e3edc827
commit bc3679d614

View File

@ -1,9 +1,12 @@
import "typings-global";
import * as plugins from "./npmci.plugins";
export let bash = (commandArg) => {
plugins.shelljs.exec(
let exitCode = plugins.shelljs.exec(
"bash -c \"source /usr/local/nvm/nvm.sh &&" +
commandArg +
"\""
);
).code;
if(exitCode !== 0){
process.exit(1);
}
}