Skip to content

Commit 69151ad

Browse files
authored
Merge pull request #2557 from YorikSar/rosetta-completion
limactl: run file manipulation subcommands under Rosetta
2 parents 2dcd64a + 605d504 commit 69151ad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/limactl/main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ func newApp() *cobra.Command {
7777
logrus.SetLevel(logrus.DebugLevel)
7878
}
7979

80-
if osutil.IsBeingRosettaTranslated() {
80+
if osutil.IsBeingRosettaTranslated() && cmd.Parent().Name() != "completion" && cmd.Name() != "generate-doc" && cmd.Name() != "validate" {
8181
// running under rosetta would provide inappropriate runtime.GOARCH info, see: https://github.com/lima-vm/lima/issues/543
82+
// allow commands that are used for packaging to run under rosetta to allow cross-architecture builds
8283
return errors.New("limactl is running under rosetta, please reinstall lima with native arch")
8384
}
8485

0 commit comments

Comments
 (0)