aboutsummaryrefslogtreecommitdiffstats
path: root/src/enforce-macos-app-location.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/enforce-macos-app-location.ts')
-rw-r--r--src/enforce-macos-app-location.ts18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/enforce-macos-app-location.ts b/src/enforce-macos-app-location.ts
index 0f858013d..0e6bf9ecc 100644
--- a/src/enforce-macos-app-location.ts
+++ b/src/enforce-macos-app-location.ts
@@ -12,11 +12,9 @@ export function enforceMacOSAppLocation() {
12 const clickedButtonIndex = api.dialog.showMessageBoxSync({ 12 const clickedButtonIndex = api.dialog.showMessageBoxSync({
13 type: 'error', 13 type: 'error',
14 message: 'Move to Applications folder?', 14 message: 'Move to Applications folder?',
15 detail: 'Ferdi must live in the Applications folder to be able to run correctly.', 15 detail:
16 buttons: [ 16 'Ferdi must live in the Applications folder to be able to run correctly.',
17 'Move to Applications folder', 17 buttons: ['Move to Applications folder', 'Quit Ferdi'],
18 'Quit Ferdi',
19 ],
20 defaultId: 0, 18 defaultId: 0,
21 cancelId: 1, 19 cancelId: 1,
22 }); 20 });
@@ -28,13 +26,13 @@ export function enforceMacOSAppLocation() {
28 26
29 api.app.moveToApplicationsFolder({ 27 api.app.moveToApplicationsFolder({
30 conflictHandler: conflict => { 28 conflictHandler: conflict => {
31 if (conflict === 'existsAndRunning') { // Can't replace the active version of the app 29 if (conflict === 'existsAndRunning') {
30 // Can't replace the active version of the app
32 api.dialog.showMessageBoxSync({ 31 api.dialog.showMessageBoxSync({
33 type: 'error', 32 type: 'error',
34 message: 'Another version of Ferdi is currently running. Quit it, then launch this version of the app again.', 33 message:
35 buttons: [ 34 'Another version of Ferdi is currently running. Quit it, then launch this version of the app again.',
36 'OK', 35 buttons: ['OK'],
37 ],
38 }); 36 });
39 37
40 api.app.quit(); 38 api.app.quit();