Skip to content

Conversation

@risu729
Copy link
Contributor

@risu729 risu729 commented Jul 1, 2025

MISE_OS or settings.os is added in #4224, but only test-tool respected it.

This PR replaces env::consts::OS or cfg!(target_os) with settings.os().

Since this will move the os detection from compile-time to runtime, it might slow down the execution.
Also, in most cases, setting MISE_OS doesn't work as expected.

This PR aims only to make the code consistent.
It might make OS-dependent tests a bit easier locally.

@github-actions
Copy link

github-actions bot commented Jul 1, 2025

If you are adding a new tool to mise, note the following:

  • New asdf plugins are not accepted
  • Tools may be rejected if they are not notable
  • A test is required in registry.toml

@risu729
Copy link
Contributor Author

risu729 commented Jul 2, 2025

We still need to replace #[cfg(windows)], but I doubt if this change is worth it.
Please feel free to close this PR.

Also, I think we should hide MISE_OS from the docs as it doesn't work well.

@jdx jdx closed this Sep 6, 2025
@risu729 risu729 deleted the settings-os branch September 6, 2025 20:35
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