add --build option, #23742

This commit is contained in:
Johannes Rieken
2017-04-04 12:19:44 +02:00
parent cfb74af74e
commit a2802f1dbf
2 changed files with 26 additions and 15 deletions

View File

@@ -13,9 +13,8 @@ const optimist = require('optimist')
.describe('debug', 'open dev tools, keep window open, reuse app data').string('debug');
const argv = optimist.argv;
const { debug, grep, run } = argv;
if (!debug) {
if (!argv.debug) {
app.setPath('userData', join(tmpdir(), `vscode-tests-${Date.now()}`));
}
@@ -32,11 +31,11 @@ app.on('ready', () => {
});
win.webContents.on('did-finish-load', () => {
if (debug) {
if (argv.debug) {
win.show();
win.webContents.openDevTools('right');
}
win.webContents.send('run', { grep, run });
win.webContents.send('run', argv);
});
win.loadURL(`file://${__dirname}/renderer.html`);
@@ -61,7 +60,7 @@ app.on('ready', () => {
console.error('\n');
}
if (!debug) {
if (!argv.debug) {
app.exit(_failures.length > 0 ? 1 : 0);
}
});