Skip to content

Commit

Permalink
Issue crc-org#2433 check if tray is running before attempting to kill…
Browse files Browse the repository at this point in the history
… during cleanup
  • Loading branch information
anjannath committed Jun 25, 2021
1 parent f085513 commit d95e34b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/crc/preflight/preflight_checks_tray_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ func stopTray() error {
* this tries to stop the old tray process, can be removed after a few releases
*/
_, _, _ = powershell.Execute(`Stop-Process -Name tray-windows`)

if err := checkIfTrayRunning(); err != nil {
return nil
}
trayProcessName := strings.TrimSuffix(constants.TrayExecutableName, ".exe")
cmd := fmt.Sprintf(`Stop-Process -Name "%s"`, trayProcessName)
if _, _, err := powershell.Execute(cmd); err != nil {
Expand Down

0 comments on commit d95e34b

Please sign in to comment.