jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
8.28k stars 219 forks source link

fix: mise trust works incorrectly with symlinked configuration file #2186

Closed roele closed 1 month ago

roele commented 1 month ago

Fixes #2175.

jdx commented 1 month ago

I have a general feeling of disgust towards this part of the code. I think a lot of decisions have been made (mostly by me of course) around canonicalizing and not canonicalizing that have ramifications that cause behavior to act in particular ways I can't recall when reading and I would need to do a deep dive here to really understand it again.

Maybe symlinks just aren't a great way to handle this? Maybe toml files with canonical/non-canonical paths would make things more clear? Idk what we should so but it just gives me a feeling this logic should be rethought from the ground-up at some point.

roele commented 1 month ago

@jdx After digging a bit around the code to resolve this issue, i can only agree on the sentiment.