CLI options to start SSH and serial connections - fixes #2785

This commit is contained in:
Eugene Pankov
2021-05-16 16:06:50 +02:00
parent 3f40098ffb
commit 7506670dfb
7 changed files with 72 additions and 16 deletions

View File

@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import * as fs from 'mz/fs'
import { Injectable } from '@angular/core'
import { ToolbarButtonProvider, ToolbarButton, ElectronService, ConfigService, SelectorOption, AppService } from 'terminus-core'
@@ -15,18 +14,6 @@ export class ButtonProvider extends ToolbarButtonProvider {
private terminal: TerminalService,
) {
super()
if (!electron.process.env.TERMINUS_DEV) {
setImmediate(async () => {
const argv: string[] = electron.process.argv
for (const arg of argv.slice(1).concat([electron.process.argv0])) {
if (await fs.exists(arg)) {
if ((await fs.stat(arg)).isDirectory()) {
this.terminal.openTab(undefined, arg)
}
}
}
})
}
}
async activate () {