Commit 9317d106 authored by Max's avatar Max Committed by Dan Abramov
Browse files

Fix check for smoke test

parent 49e2fb54
No related merge requests found
Showing with 5 additions and 1 deletion
+5 -1
...@@ -17,10 +17,14 @@ var config = require('../config/webpack.config.dev'); ...@@ -17,10 +17,14 @@ var config = require('../config/webpack.config.dev');
var execSync = require('child_process').execSync; var execSync = require('child_process').execSync;
var opn = require('opn'); var opn = require('opn');
function isSmokeTest() {
return process.argv.some(function (item) { return item.indexOf('--smoke-test') > -1 });
}
// TODO: hide this behind a flag and eliminate dead code on eject. // TODO: hide this behind a flag and eliminate dead code on eject.
// This shouldn't be exposed to the user. // This shouldn't be exposed to the user.
var handleCompile; var handleCompile;
if (process.argv[2] === '--smoke-test') { if (isSmokeTest()) {
handleCompile = function (err, stats) { handleCompile = function (err, stats) {
if (err || stats.hasErrors() || stats.hasWarnings()) { if (err || stats.hasErrors() || stats.hasWarnings()) {
process.exit(1); process.exit(1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment