Skip to content

Commit

Permalink
core: make qemu binfmt a soft requirement. (#870)
Browse files Browse the repository at this point in the history
  • Loading branch information
abiosoft authored Nov 15, 2023
1 parent ac7e9f6 commit 565ddd0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions environment/vm/lima/lima.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,10 @@ func (l *limaVM) addPostStartActions(a *cli.ActiveCommandChain, conf config.Conf
a.Add(func() error {
if !l.limaConf.Rosetta.Enabled {
// use binfmt when rosetta is disabled and emulation is disabled i.e. host arch
if environment.HostArch() == environment.Arch(conf.Arch).Value() {
return core.SetupBinfmt(l.host, l, environment.Arch(conf.Arch))
if arch := environment.HostArch(); arch == environment.Arch(conf.Arch).Value() {
if err := core.SetupBinfmt(l.host, l, environment.Arch(conf.Arch)); err != nil {
logrus.Warn(fmt.Errorf("unable to enable qemu %s emulation: %w", arch, err))
}
}

// rosetta is disabled
Expand Down

0 comments on commit 565ddd0

Please sign in to comment.