File tree Expand file tree Collapse file tree 1 file changed +16
-15
lines changed Expand file tree Collapse file tree 1 file changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -328,26 +328,27 @@ func loop() {
328328 }
329329 }
330330
331- // osx agent launchd autostart
332- // TODO ignore setting if not on macos
333- if * autostartMacOS {
334- err := config .WritePlistFile ()
335- if err != nil {
336- log .Info (err )
337- } else {
338- err = config .LoadLaunchdAgent ()
331+ // macos agent launchd autostart
332+ if runtime .GOOS == "darwin" {
333+ if * autostartMacOS {
334+ err := config .WritePlistFile ()
339335 if err != nil {
340- log .Error (err )
336+ log .Info (err )
337+ } else {
338+ err = config .LoadLaunchdAgent ()
339+ if err != nil {
340+ log .Error (err )
341+ }
341342 }
342- }
343- } else {
344- err := config .UnloadLaunchdAgent ()
345- if err != nil {
346- log .Error (err )
347343 } else {
348- err = config .RemovePlistFile ()
344+ err : = config .UnloadLaunchdAgent ()
349345 if err != nil {
350346 log .Error (err )
347+ } else {
348+ err = config .RemovePlistFile ()
349+ if err != nil {
350+ log .Error (err )
351+ }
351352 }
352353 }
353354 }
You can’t perform that action at this time.
0 commit comments