Prevent /usr/local/bin/hyper overwriting (#2885)

Silently fail installation at startup.
Add a menu item to manually install it with a notification feedback.
Fix plugin update menu item.

Fixes #2884
This commit is contained in:
CHaBou 2018-04-22 22:13:23 +02:00 committed by GitHub
parent 2de45245bf
commit dfe5ab89fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 88 additions and 49 deletions

View file

@ -1,4 +1,4 @@
module.exports = (commands, update) => {
module.exports = (commands, execCommand) => {
return {
label: 'Plugins',
submenu: [
@ -6,8 +6,17 @@ module.exports = (commands, update) => {
label: 'Update',
accelerator: commands['plugins:update'],
click() {
update();
execCommand('plugins:update');
}
},
{
label: 'Install Hyper CLI command in PATH',
click() {
execCommand('cli:install');
}
},
{
type: 'separator'
}
]
};