MCPcopy Create free account
hub / github.com/gitify-app/gitify / promptMoveToApplicationsFolder

Function promptMoveToApplicationsFolder

src/main/lifecycle/first-run.ts:25–44  ·  view source on GitHub ↗

* Ask user if the app should be moved to the applications folder (macOS).

()

Source from the content-addressed store, hash-verified

23 * Ask user if the app should be moved to the applications folder (macOS).
24 */
25async function promptMoveToApplicationsFolder() {
26 if (!isMacOS()) {
27 return;
28 }
29
30 if (isDevMode() || app.isInApplicationsFolder()) {
31 return;
32 }
33
34 const { response } = await dialog.showMessageBox({
35 type: 'question',
36 buttons: ['Move to Applications Folder', 'Do Not Move'],
37 defaultId: 0,
38 message: 'Move to Applications Folder?',
39 });
40
41 if (response === 0) {
42 app.moveToApplicationsFolder();
43 }
44}
45
46/**
47 * Returns the absolute path to the first-run marker file in the user data directory.

Callers 1

onFirstRunMaybeFunction · 0.85

Calls 2

isMacOSFunction · 0.90
isDevModeFunction · 0.90

Tested by

no test coverage detected