Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue warning message when using wrong LIMA_HOME #2330

Merged
merged 1 commit into from May 18, 2024

Conversation

afbjorklund
Copy link
Contributor

@afbjorklund afbjorklund commented May 7, 2024

Improves the error message, when using a top-level directory by mistake.

$ mkdir -p /tmp/foo/bar
$ LIMA_HOME=/tmp/foo _output/bin/limactl ls
WARN[0000] The directory "/tmp/foo" does not look like a valid Lima directory: stat /tmp/foo/bar/lima.yaml: no such file or directory 
FATA[0000] unable to load instance bar: open /tmp/foo/bar/lima.yaml: no such file or directory 

We want to avoid the case where people "forget" to include the lima subdirectory.


Currently the semantics are hidden under "internals": https://lima-vm.io/docs/dev/internals/

And it can be assumed that LIMA_HOME will work similar to HOME, i.e. add the subdir for you

Once we have documentation on how to relocate the instances to a local disk, we can recommend a subdir.

Something like LIMA_HOME=/local/$USER/lima or somesuch, for where ~/.lima is on a network filesystem

@AkihiroSuda AkihiroSuda added this to the v0.22.1 (tentative) milestone May 7, 2024
AkihiroSuda
AkihiroSuda previously approved these changes May 7, 2024
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

cmd/limactl/list.go Outdated Show resolved Hide resolved
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit bbf7a9b into lima-vm:master May 18, 2024
27 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.

None yet

3 participants