Skip to content

Commit

Permalink
Merge pull request #14 from edx/djoy/exit_codes
Browse files Browse the repository at this point in the history
fix: exit fedx-scripts with the status code of the invoked tool
  • Loading branch information
davidjoy authored Oct 17, 2019
2 parents 32fe4cb + f9c5708 commit 0792320
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion scripts/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ module.exports = (args = []) => {
args.push(`--config-file=${configFile}`);
}

spawn('babel', args);
spawn('babel', args).on('exit', (code) => {
process.exit(code);
});
};
4 changes: 3 additions & 1 deletion scripts/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ module.exports = (args = []) => {
args.push(`--config=${configFile}`);
}

spawn('eslint', [...args, PROJECT_ROOT]);
spawn('eslint', [...args, PROJECT_ROOT]).on('exit', (code) => {
process.exit(code);
});
};
4 changes: 3 additions & 1 deletion scripts/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ const getProjectConfigFile = require('../lib/getProjectConfigFile.js');
module.exports = (args = []) => {
getProjectConfigFile('jest');

spawn('jest', args);
spawn('jest', args).on('exit', (code) => {
process.exit(code);
});
};
2 changes: 2 additions & 0 deletions scripts/webpack-dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ module.exports = (args = []) => {
NODE_ENV: 'development',
BABEL_ENV: 'development',
},
}).on('exit', (code) => {
process.exit(code);
});
};
2 changes: 2 additions & 0 deletions scripts/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ module.exports = (args = []) => {
NODE_ENV: 'production',
BABEL_ENV: 'production',
},
}).on('exit', (code) => {
process.exit(code);
});
};

0 comments on commit 0792320

Please sign in to comment.