-
Notifications
You must be signed in to change notification settings - Fork 570
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
Add possibility to override /tmp #2345
base: master
Are you sure you want to change the base?
Conversation
On second thought, having We probably still need to do something different on Windows, and not use localpathutil? No idea where Possibly something like |
Use `$TMPDIR` to change the location of `/tmp` on Unix. Use `$TEMP` to change the location of `/tmp` on Windows. Signed-off-by: Anders F Björklund <[email protected]>
Output the temporary directory in the `limactl info`. It is possible to use the utility `cygpath` on Windows. Signed-off-by: Anders F Björklund <[email protected]>
Now the location is the same as the mountpoint, so the illusion holds. i.e. you can still do something like Reference to the https://www.msys2.org/docs/filesystem-paths/ (skipped the /mnt) |
I have not really used Lima on Windows yet, but aren't we using WSL2 for the emulation? In that case we should be using WSL2 path names and not msys hacks. Note that with WSL2 (depending on how it is configured) none of our mounting really matters as everything is already mounted anyways: suse@rd-w11-test-1:~$ wslpath -u c:\\user
/mnt/c/user
suse@rd-w11-test-1:~$ wslpath -w /tmp
\\wsl.localhost\Ubuntu-22.04\tmp |
This was having the eye towards QEMU (or Hyper-V perhaps), but mostly it was just a (new) unit test failure...
As you mention I think WSL comes with (9p) mounts already. But it doesn't run custom kernels or custom cloud images. |
Then again, this feature is really on needed on Fedora or on Windows (i.e. without WSL) It is not needed on Ubuntu or on macOS, so I think I will just leave it in "draft" for a while |
Use
$TMPDIR
to change the location of/tmp
on Unix.Use
$TEMP
to change the location of/tmp
on Windows.https://pkg.go.dev/os#TempDir
Closes #2339