From aa6014862d023be1d82ab7d23f0fed2d404f9cce Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Fri, 11 Jan 2019 00:22:37 +0100 Subject: [PATCH] fix(arm): ignore relay on arm #66 --- src/background/ssh.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/background/ssh.js b/src/background/ssh.js index 3fe7e37..6f14281 100644 --- a/src/background/ssh.js +++ b/src/background/ssh.js @@ -1,5 +1,6 @@ const appPath = require('./electronAppPath') const { spawn } = require('child_process') +const fs = require('fs') function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; @@ -27,7 +28,13 @@ const startSSH = (port, host, user, password, callback) => { '-v' ] - const ssh = spawn(appPath('plink'), options) + const sshClientPath = appPath('plink'); + if(!fs.existsSync(sshClientPath)) { + logTE('ssh', 'plink not founded for system in path', sshClientPath) + return + } + + const ssh = spawn(sshClientPath, options) const checkMessage = (data) => { if(data.includes(`Remote port forwarding from 0.0.0.0:${remotePort}`))