Skip to content

Commit 9317d10

Browse files
mxstbrgaearon
authored andcommitted
Fix check for smoke test
1 parent 49e2fb5 commit 9317d10

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/start.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ var config = require('../config/webpack.config.dev');
1717
var execSync = require('child_process').execSync;
1818
var opn = require('opn');
1919

20+
function isSmokeTest() {
21+
return process.argv.some(function (item) { return item.indexOf('--smoke-test') > -1 });
22+
}
23+
2024
// TODO: hide this behind a flag and eliminate dead code on eject.
2125
// This shouldn't be exposed to the user.
2226
var handleCompile;
23-
if (process.argv[2] === '--smoke-test') {
27+
if (isSmokeTest()) {
2428
handleCompile = function (err, stats) {
2529
if (err || stats.hasErrors() || stats.hasWarnings()) {
2630
process.exit(1);

0 commit comments

Comments
 (0)