ssh connection fix (fixes #1161, fixes #1182)

This commit is contained in:
Eugene Pankov 2019-07-04 23:29:21 +02:00
parent 493186ce53
commit e6e3c59e63
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ import { PasswordStorageService } from './passwordStorage.service'
import { SSH2Stream } from 'ssh2-streams' import { SSH2Stream } from 'ssh2-streams'
try { try {
var windowsProcessTree = require('@terminus-term/windows-process-tree') // eslint-disable-line @typescript-eslint/no-var-requires var windowsProcessTreeNative = require('windows-process-tree/build/Release/windows_process_tree.node') // eslint-disable-line @typescript-eslint/no-var-requires
} catch { } } catch { }
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
@ -138,7 +138,7 @@ export class SSHService {
let agent: string = null let agent: string = null
if (this.hostApp.platform === Platform.Windows) { if (this.hostApp.platform === Platform.Windows) {
const pageantRunning = new Promise<boolean>(resolve => { const pageantRunning = new Promise<boolean>(resolve => {
windowsProcessTree.getProcessList(list => { windowsProcessTreeNative.getProcessList(list => {
resolve(list.some(x => x.name === 'pageant.exe')) resolve(list.some(x => x.name === 'pageant.exe'))
}, 0) }, 0)
}) })

View File

@ -49,10 +49,10 @@ module.exports = {
'keytar', 'keytar',
'path', 'path',
'ngx-toastr', 'ngx-toastr',
'@terminus-term/windows-process-tree', 'windows-process-tree/build/Release/windows_process_tree.node',
/^rxjs/, /^rxjs/,
/^@angular/, /^@angular/,
/^@ng-bootstrap/, /^@ng-bootstrap/,
/^terminus-/, /^terminus-/,
], ]
} }