From 2e15d16fe274645556174f1d1fd386acb4284e09 Mon Sep 17 00:00:00 2001 From: Jacob Weber Date: Wed, 11 Mar 2020 13:47:10 -0700 Subject: [PATCH] no auto-launch on linux --- src/preferences.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preferences.ts b/src/preferences.ts index 51fadeb..8e1b4a2 100644 --- a/src/preferences.ts +++ b/src/preferences.ts @@ -81,7 +81,7 @@ export interface ExportedPreferences { export const exportPrefs = function(prefs: Preferences): ExportedPreferences { const exported: ExportedPreferences = {}; - if (!app.getLoginItemSettings) { + if (process.platform === 'linux') { exported.launchStartup = null; } else { exported.launchStartup = prefs.launchStartup; @@ -159,7 +159,7 @@ export const savePreferences = async function(data: Preferences = {}, oldData?: } } - if (app.getLoginItemSettings) { + if (process.platform !== 'linux' && app.getLoginItemSettings) { const settings = app.getLoginItemSettings({}); if (settings.openAtLogin !== data.launchStartup) { app.setLoginItemSettings({