Skip to content

Commit 60235a9

Browse files
committed
Generated browserstack.json using preset "default" having 8 browsers. is broken
1 parent ed31bd4 commit 60235a9

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

bin/cli.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ if (process.argv[2] == '--verbose')
55
else
66
global.logLevel = "info";
77

8+
if (process.argv[2] == 'init') {
9+
require('./init.js');
10+
return;
11+
}
12+
813
var Log = require('../lib/logger'),
914
logger = new Log(global.logLevel),
1015
BrowserStack = require('browserstack'),
@@ -275,19 +280,15 @@ function runTests() {
275280
}
276281

277282
try {
278-
if (process.argv[2] == 'init') {
279-
require('./init.js');
280-
} else {
281-
var client = BrowserStack.createClient({
282-
username: config.username,
283-
password: config.key
284-
});
285-
runTests();
286-
var pid_file = process.cwd() + '/browserstack-run.pid';
287-
fs.writeFileSync(pid_file, process.pid, 'utf-8')
288-
process.on('SIGINT', function() { cleanUpAndExit('SIGINT', 1) });
289-
process.on('SIGTERM', function() { cleanUpAndExit('SIGTERM', config.status) });
290-
}
283+
var client = BrowserStack.createClient({
284+
username: config.username,
285+
password: config.key
286+
});
287+
runTests();
288+
var pid_file = process.cwd() + '/browserstack-run.pid';
289+
fs.writeFileSync(pid_file, process.pid, 'utf-8')
290+
process.on('SIGINT', function() { cleanUpAndExit('SIGINT', 1) });
291+
process.on('SIGTERM', function() { cleanUpAndExit('SIGTERM', config.status) });
291292
} catch (e) {
292293
console.log(e);
293294
console.log('Invalid command.');

0 commit comments

Comments
 (0)