fix: avoid resolving symlinks on windows trampoline#5924
Conversation
|
I think we should use https://docs.rs/dunce/latest/dunce/fn.simplified.html instead on windows. |
Now I just remove the line from windows. Do you think it has value to change it to dunce? |
|
I assume the canonicalize was there for a reason? I agree that resolving symlinks doesnt seem required. I read a bit more about this, we can also use https://doc.rust-lang.org/std/path/fn.absolute.html that wont resolve symlinks but should at least absolutize the path? |
|
It was there from this PR: #5773 |
|
Why not for windows? Symlinks are also supported there? Ok reading this more carefully now. The code currently resolves all symlinks. Then it reads the configuration next to the resolved executable. This ensures that if you symlink a binary that it can properly find the configuration next to the original binary (instead of next to the symlink). Ah but as described in the issue Sorry for the noise! Lets make sure to add a comment though! |
Co-authored-by: Bas Zalmstra <4995967+baszalmstra@users.noreply.github.com>
|
@baszalmstra Thanks for the in-depth review! |
Description
Avoid resolving symlinks on windows in a trampoline binary.
Trampolines are being build in: https://github.com/prefix-dev/pixi/actions/runs/24658245390 Afterwards I merged them into this branch.
Fixes #5923
How Has This Been Tested?
I wasn't able to reproduce the issue described in #5923 but after discussing with @wolfv it does make sense to use to avoid this behavior on Windows.
Checklist: