From 3fa893b326467204b49de8d1204e3f02044a7564 Mon Sep 17 00:00:00 2001 From: Anjan Nath Date: Mon, 14 Mar 2022 16:25:56 +0530 Subject: [PATCH] ignore error when removing tray related launchd plist file this solves the following error from `crc setup`: ``` remove /Users/prkumar/Library/LaunchAgents/crc.daemon.plist: no such file or directory ``` --- pkg/crc/preflight/preflight_darwin.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/crc/preflight/preflight_darwin.go b/pkg/crc/preflight/preflight_darwin.go index 7edb9f41c8..97166cb58b 100644 --- a/pkg/crc/preflight/preflight_darwin.go +++ b/pkg/crc/preflight/preflight_darwin.go @@ -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},