Do not auto-open tab if we've started the console and pointed it to open in a specific location

This commit is contained in:
Austin Warren 2019-07-17 17:17:50 -07:00
parent 5679d5edf1
commit 380266a57c

View File

@ -156,10 +156,18 @@ export default class TerminalModule { // eslint-disable-line @typescript-eslint/
}
})
if (config.store.terminal.autoOpen) {
let argv = require('electron').remote.process.argv;
if (argv[0].includes('node')) {
argv = argv.slice(1)
}
if(require('yargs').parse(argv.slice(1))._[0] !== "open"){
app.ready$.subscribe(() => {
terminal.openTab()
})
}
}
hotkeys.matchedHotkey.subscribe(async (hotkey) => {
if (hotkey === 'new-tab') {