Skip to content

Commit 926c78e

Browse files
committed
libvirt/constants.go: Add arch info to download machine-driver-libvirt binary
machine-driver-libvirt now have arm64 and amd64 binary for linux platfrom. This PR will make sure correct binary is downloaded and used for specific platform. Name of the binary should be `machine-driver-libvirt` because this name is hard-coded as part of the plugin - https://github.com/crc-org/machine/blob/master/libmachine/drivers/plugin/localbinary/plugin.go#L55-L63 Now during start user get follow warning which need to be ignored ``` WARN Executable name is crc-driver-libvirt but extracted file name is crc-driver-libvirt-amd64 ```
1 parent 589e152 commit 926c78e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/crc/machine/libvirt/constants.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package libvirt
55

66
import (
77
"fmt"
8+
"runtime"
89

910
"github.com/crc-org/crc/v2/pkg/crc/constants"
1011
)
@@ -25,7 +26,7 @@ const (
2526
)
2627

2728
var (
28-
MachineDriverDownloadURL = fmt.Sprintf("https://github.com/crc-org/machine-driver-libvirt/releases/download/%s/%s", MachineDriverVersion, machineDriverCommand)
29+
MachineDriverDownloadURL = fmt.Sprintf("https://github.com/crc-org/machine-driver-libvirt/releases/download/%s/%s-%s", MachineDriverVersion, machineDriverCommand, runtime.GOARCH)
2930
)
3031

3132
func MachineDriverPath() string {

0 commit comments

Comments
 (0)