Skip to content

Commit

Permalink
preflight: always use crc.exe abs path with small case drive letter
Browse files Browse the repository at this point in the history
in the hidden_daemon.ps1 script always use the path of crc.exe with
small case drive letter, this should fix any path missmatch that might
happen when crc is invoked from some other program as seen with the
extension issue #175
  • Loading branch information
anjannath committed Sep 25, 2023
1 parent 5ede7d3 commit 6d23f5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/crc/preflight/preflight_daemon_task_check_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ func getDaemonPoshScriptContent() []byte {
if err != nil {
return []byte{}
}
drive := filepath.VolumeName(binPath)
binPathWithSmallCaseDriveLetter := strings.Replace(binPath, drive, strings.ToLower(drive), 1)
daemonCmdArgs := `daemon --log-level debug`
return []byte(fmt.Sprintf(daemonPoshScriptTemplate, binPath, daemonCmdArgs))
return []byte(fmt.Sprintf(daemonPoshScriptTemplate, binPathWithSmallCaseDriveLetter, daemonCmdArgs))
}

func checkDaemonPoshScript() error {
Expand Down

0 comments on commit 6d23f5a

Please sign in to comment.