Skip to content

Commit

Permalink
libvirt/constants.go: Add arch info to download machine-driver-libvir…
Browse files Browse the repository at this point in the history
…t 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
```
  • Loading branch information
praveenkumar committed Jun 27, 2024
1 parent 589e152 commit 926c78e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/crc/machine/libvirt/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package libvirt

import (
"fmt"
"runtime"

"github.com/crc-org/crc/v2/pkg/crc/constants"
)
Expand All @@ -25,7 +26,7 @@ const (
)

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

func MachineDriverPath() string {
Expand Down

0 comments on commit 926c78e

Please sign in to comment.