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

include symlink error context in error message #2040

Merged
merged 1 commit into from
May 7, 2024

Conversation

KlotzAndrew
Copy link
Contributor

this change updates this error message

mise tracking config: Permission denied (os error 13)

to this:

mise tracking config: failed to ln -sf .../mise/.mise.local.toml ~/pule/.local/state/mise/tracked-configs/35d795b4e6c9a289: Permission denied (os error 13)

in my case there was a permission error on the destination link, which triggered an error for each 5 config files it was trying to link on every command. I was seeing this in my terminal, which on its own provides no context for debugging and is very noisy:

$ mise --version
2024.4.8 macos-arm64 (2024-04-23)
mise tracking config: Permission denied (os error 13)
mise tracking config: Permission denied (os error 13)
mise tracking config: Permission denied (os error 13)
mise tracking config: Permission denied (os error 13)
mise tracking config: Permission denied (os error 13)

the permission error on its own is an easy fix, I just needed to run mise with this debug info to figure out where the problem was

this change updates this error message

```bash
mise tracking config: Permission denied (os error 13)
```

to this:

```bash
mise tracking config: failed to ln -sf .../mise/.mise.local.toml ~/pule/.local/state/mise/tracked-configs/35d795b4e6c9a289: Permission denied (os error 13)
```

in my case there was a permission error on the destination link, which
triggered an error for each 5 config files it was trying to link on every command.
I was seeing this in my terminal, which on its own provides no context for debugging
and is very noisy:

```bash
$ mise --version
2024.4.8 macos-arm64 (2024-04-23)
mise tracking config: Permission denied (os error 13)
mise tracking config: Permission denied (os error 13)
mise tracking config: Permission denied (os error 13)
mise tracking config: Permission denied (os error 13)
mise tracking config: Permission denied (os error 13)
```

the permission error on its own is an easy fix, I just needed to run
mise with this debug info to figure out where the problem was
@jdx jdx merged commit 04f856a into jdx:main May 7, 2024
6 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.

2 participants