File tree 1 file changed +2
-16
lines changed
pkg/minikube/registry/drvs/qemu2
1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import (
21
21
"fmt"
22
22
"os"
23
23
"os/exec"
24
- "path"
25
24
"path/filepath"
26
25
"runtime"
27
26
"strings"
@@ -80,27 +79,14 @@ func qemuFirmwarePath(customPath string) (string, error) {
80
79
arch := runtime .GOARCH
81
80
// For macOS, find the correct brew installation path for qemu firmware
82
81
if runtime .GOOS == "darwin" {
83
- var p , fw string
84
82
switch arch {
85
83
case "amd64" :
86
- p = "/usr/local/Cellar/qemu"
87
- fw = "share/qemu/edk2-x86_64-code.fd"
84
+ return "/usr/local/opt/qemu/share/qemu/edk2-x86_64-code.fd" , nil
88
85
case "arm64" :
89
- p = "/opt/homebrew/Cellar/qemu"
90
- fw = "share/qemu/edk2-aarch64-code.fd"
86
+ return "/opt/homebrew/opt/qemu/share/qemu/edk2-aarch64-code.fd" , nil
91
87
default :
92
88
return "" , fmt .Errorf ("unknown arch: %s" , arch )
93
89
}
94
-
95
- v , err := os .ReadDir (p )
96
- if err != nil {
97
- return "" , fmt .Errorf ("lookup qemu: %v" , err )
98
- }
99
- for _ , version := range v {
100
- if version .IsDir () {
101
- return path .Join (p , version .Name (), fw ), nil
102
- }
103
- }
104
90
}
105
91
106
92
switch arch {
You can’t perform that action at this time.
0 commit comments