File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -173,24 +173,27 @@ export default class AppStore extends Store {
173173 @action _launchOnStartup ( { enable, openInBackground } ) {
174174 this . autoLaunchOnStart = enable ;
175175
176- const settings = {
176+ let settings = {
177177 openAtLogin : enable ,
178- openAsHidden : openInBackground ,
179- path : updateExe ,
180- args : [
181- '--processStart' , `"${ exeName } "` ,
182- ] ,
183178 } ;
184179
185180 // For Windows
186- if ( openInBackground ) {
187- settings . args . push (
188- '--process-start-args' , '"--hidden"' ,
189- ) ;
181+ if ( process . platform === 'win32' ) {
182+ settings = Object . assign ( {
183+ openAsHidden : openInBackground ,
184+ path : updateExe ,
185+ args : [
186+ '--processStart' , `"${ exeName } "` ,
187+ ] ,
188+ } , settings ) ;
189+
190+ if ( openInBackground ) {
191+ settings . args . push (
192+ '--process-start-args' , '"--hidden"' ,
193+ ) ;
194+ }
190195 }
191196
192- app . setLoginItemSettings ( settings ) ;
193-
194197 gaEvent ( 'App' , enable ? 'enable autostart' : 'disable autostart' ) ;
195198 }
196199
You can’t perform that action at this time.
0 commit comments