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

[RFC] [Windows] Consider allow extra path set by limactl to improve Windows UX #3332

Open
arixmkii opened this issue Mar 10, 2025 · 1 comment · May be fixed by #3347
Open

[RFC] [Windows] Consider allow extra path set by limactl to improve Windows UX #3332

arixmkii opened this issue Mar 10, 2025 · 1 comment · May be fixed by #3347
Labels
area/cli limactl CLI user experience platform/Windows

Comments

@arixmkii
Copy link
Contributor

Description

limactl on Windows requires additional Unix tools to operate (right now only tested against Git bash). The most straightforward they to use limactl is from Git bash, but this is not general purpose shell with no extension points (user is only getting the tools provided with the distribution). For daily work one might better prefer full msys2 with a package manager or Powershell as a more Windows flavored alternative, but then git tools under /usr/bin have to be added to PATH and take precedence of the tools provided by the shell. It works well for limactl, there are number of inherited problems with this approach:

  • with msys2 multiple tools from Git will collide with msys2 and running msys2 userspace applications from different roots is bug prone. The big offender here is bash, when I tried it, to preserve env I needed to call it through cmd - cmd /C "bash -c '<your commands>'" if I needed to preserve env of my working shell.
  • with Powershell bash again is a problem, because when working in PS one might expect bash to be a command to start shell into default WSL instance.

To support using these shells and limactl with more convenience it is possible to allow limactl to read dedicated environment variable and then use os.Setenv to update path early in the process startup (before any of the tools are needed). os.Setenv is not universally supported across platforms, but works in Windows at least, so, the scope might be narrowed for Windows case.

I created a prototype arixmkii@4cefee4 but I want to have a brief discussion if this sounds feasible before making into full fledged PR.

@jandubois
Copy link
Member

jandubois commented Mar 10, 2025

I created a prototype arixmkii@4cefee4 but I want to have a brief discussion if this sounds feasible before making into full fledged PR.

I'm not sure if this is going to be the right long-term solution (I suspect we may need something to configure external drivers to control these kind of settings), but I would support adding this temporarily for the benefit of experimentation. I would probably prefix the variable with _LIMA instead of LIMA to make it obvious that this is an experimental thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli limactl CLI user experience platform/Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants