Skip to content

Conversation

AkihiroSuda
Copy link
Member

Fix #4167

@AkihiroSuda AkihiroSuda added this to the v2.0.0 milestone Oct 8, 2025
@AkihiroSuda AkihiroSuda force-pushed the fix-4167 branch 3 times, most recently from a1edf08 to 2cbbb95 Compare October 8, 2025 09:35
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change is wrong. You should return a non-ExitError if you want limactl to print it. Getting a FATAL error just because a subprocess exited with a non-zero code is annoying. HandleExitError() exists to prevent it from being printed while all other errors still show up.

Now we are getting this:

cat ~/bin/limactl-false
#!/bin/sh
falselimactl false
FATA[0000] external command "/Users/jan/bin/limactl-false" failed  error="exit status 1"echo $?
1

There should be no output except when the error is internal to limactl itself. Those errors have always been reported (this is from master):

echo false > ~/bin/limactl-nohashbangchmod +x ~/bin/limactl-nohashbanglimactl-nohashbangecho $?
1limactl nohashbang
FATA[0000] external command "/Users/jan/bin/limactl-nohashbang" failed: fork/exec /Users/jan/bin/limactl-nohashbang: exec format error

@AkihiroSuda AkihiroSuda changed the title main.go: print ExitError before exiting print an error that wraps ExitError Oct 9, 2025
Fix issue 4167

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@AkihiroSuda AkihiroSuda merged commit 3e78acd into lima-vm:master Oct 9, 2025
61 of 64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--network lima:shared fails without printing an error when the sudoers file is missing

2 participants