From 4a127ef83b7276dd12646468497f4d3ec9fa1bb4 Mon Sep 17 00:00:00 2001 From: Ajo John Date: Thu, 8 Mar 2018 20:15:49 +0530 Subject: [PATCH] Do not register app for `ssh://` url scheme handling on dev mode (#2745) Fixes #2740 --- app/index.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/app/index.js b/app/index.js index 8e287057..47785025 100644 --- a/app/index.js +++ b/app/index.js @@ -183,15 +183,17 @@ app.on('ready', () => // expose to plugins app.createWindow = createWindow; - // check if should be set/removed as default ssh protocol client - if (config.getConfig().defaultSSHApp && !app.isDefaultProtocolClient('ssh')) { - //eslint-disable-next-line no-console - console.log('Setting Hyper as default client for ssh:// protocol'); - app.setAsDefaultProtocolClient('ssh'); - } else if (!config.getConfig().defaultSSHApp && app.isDefaultProtocolClient('ssh')) { - //eslint-disable-next-line no-console - console.log('Removing Hyper from default client for ssh:// protocl'); - app.removeAsDefaultProtocolClient('ssh'); + if (!isDev) { + // check if should be set/removed as default ssh protocol client + if (config.getConfig().defaultSSHApp && !app.isDefaultProtocolClient('ssh')) { + //eslint-disable-next-line no-console + console.log('Setting Hyper as default client for ssh:// protocol'); + app.setAsDefaultProtocolClient('ssh'); + } else if (!config.getConfig().defaultSSHApp && app.isDefaultProtocolClient('ssh')) { + //eslint-disable-next-line no-console + console.log('Removing Hyper from default client for ssh:// protocl'); + app.removeAsDefaultProtocolClient('ssh'); + } } // mac only. when the dock icon is clicked