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

Additional json output for mise doctor and mise env #3012

Closed
hverlin opened this issue Nov 13, 2024 · 1 comment · Fixed by #3715
Closed

Additional json output for mise doctor and mise env #3012

hverlin opened this issue Nov 13, 2024 · 1 comment · Fixed by #3715

Comments

@hverlin
Copy link
Contributor

hverlin commented Nov 13, 2024

Hi, would it be possible to add json output for more commands?

  • mise doctor --json (this would allow one to extract settings, dirs, warnings, ...)
  • mise env --json exists, however it does not indicate which config file was used to load each environment variable (like mis ls --json or mise tasks --json). Can we add another option to this command to indicate where the variable comes from?
@hverlin
Copy link
Contributor Author

hverlin commented Dec 19, 2024

For mise doctor, I think the only thing that's needed are the state directories (otherwise, everything is exposed through other commands like version, backends, plugins, settings...

One can use a similar logic as in the code to get the state dirs, though just wondering if having a hidden command to get them as json would work (maybe mise dirs --json)? I can create a PR

(unless mise doctor --json is better?)

The main reason is to know where the shims are located without to parse mise doctor output

jdx added a commit that referenced this issue Dec 19, 2024
@jdx jdx linked a pull request Dec 19, 2024 that will close this issue
@jdx jdx closed this as completed in #3715 Dec 19, 2024
@jdx jdx closed this as completed in bde7bd5 Dec 19, 2024
miguelmig pushed a commit to miguelmig/mise that referenced this issue Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant