mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Do not register app for ssh:// url scheme handling on dev mode (#2745)
Fixes #2740
This commit is contained in:
parent
36cde0f23e
commit
4a127ef83b
1 changed files with 11 additions and 9 deletions
20
app/index.js
20
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue