Skip to content

Commit

Permalink
ignore error when removing tray related launchd plist file
Browse files Browse the repository at this point in the history
this solves the following error from `crc setup`:
```
remove /Users/prkumar/Library/LaunchAgents/crc.daemon.plist: no such file or directory
```
  • Loading branch information
anjannath authored and gbraad committed Mar 14, 2022
1 parent f442ec6 commit 3fa893b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/crc/preflight/preflight_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ var trayLaunchdCleanupChecks = []Check{
fixDescription: "Removing old launchd config for tray autostart",
fix: func() error {
_ = os.Remove(filepath.Join(constants.GetHomeDir(), "Library", "LaunchAgents", "crc.tray.plist"))
return os.Remove(filepath.Join(constants.GetHomeDir(), "Library", "LaunchAgents", "crc.daemon.plist"))
_ = os.Remove(filepath.Join(constants.GetHomeDir(), "Library", "LaunchAgents", "crc.daemon.plist"))
return nil
},

labels: labels{Os: Darwin},
Expand Down

0 comments on commit 3fa893b

Please sign in to comment.