File tree 1 file changed +15
-12
lines changed
1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -173,24 +173,27 @@ export default class AppStore extends Store {
173
173
@action _launchOnStartup ( { enable, openInBackground } ) {
174
174
this . autoLaunchOnStart = enable ;
175
175
176
- const settings = {
176
+ let settings = {
177
177
openAtLogin : enable ,
178
- openAsHidden : openInBackground ,
179
- path : updateExe ,
180
- args : [
181
- '--processStart' , `"${ exeName } "` ,
182
- ] ,
183
178
} ;
184
179
185
180
// 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
+ }
190
195
}
191
196
192
- app . setLoginItemSettings ( settings ) ;
193
-
194
197
gaEvent ( 'App' , enable ? 'enable autostart' : 'disable autostart' ) ;
195
198
}
196
199
You can’t perform that action at this time.
0 commit comments