Do not register app for ssh:// url scheme handling on dev mode (#2745)

Fixes #2740
This commit is contained in:
Ajo John 2018-03-08 20:15:49 +05:30 committed by CHaBou
parent 36cde0f23e
commit 4a127ef83b

View file

@ -183,15 +183,17 @@ app.on('ready', () =>
// expose to plugins // expose to plugins
app.createWindow = createWindow; app.createWindow = createWindow;
// check if should be set/removed as default ssh protocol client if (!isDev) {
if (config.getConfig().defaultSSHApp && !app.isDefaultProtocolClient('ssh')) { // check if should be set/removed as default ssh protocol client
//eslint-disable-next-line no-console if (config.getConfig().defaultSSHApp && !app.isDefaultProtocolClient('ssh')) {
console.log('Setting Hyper as default client for ssh:// protocol'); //eslint-disable-next-line no-console
app.setAsDefaultProtocolClient('ssh'); console.log('Setting Hyper as default client for ssh:// protocol');
} else if (!config.getConfig().defaultSSHApp && app.isDefaultProtocolClient('ssh')) { app.setAsDefaultProtocolClient('ssh');
//eslint-disable-next-line no-console } else if (!config.getConfig().defaultSSHApp && app.isDefaultProtocolClient('ssh')) {
console.log('Removing Hyper from default client for ssh:// protocl'); //eslint-disable-next-line no-console
app.removeAsDefaultProtocolClient('ssh'); console.log('Removing Hyper from default client for ssh:// protocl');
app.removeAsDefaultProtocolClient('ssh');
}
} }
// mac only. when the dock icon is clicked // mac only. when the dock icon is clicked