-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
docs: add FAQ and troubleshooting entries based on common Discord questions #8930
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b38d68d
docs: add FAQ and troubleshooting entries based on common Discord que…
jdx cd5f7b4
docs(faq): clarify that `latest` resolves to remote in some commands
jdx 3934eac
docs(faq): mention `mise doctor` for diagnosing trust issues
jdx 00abfe0
docs(faq): fix deprecated setting, use idiomatic_version_file_enable_…
jdx 7cfd6c7
docs: note that mise activate partially works in non-interactive shel…
jdx da75d15
docs: add FAQ and tips from #mise-general Discord analysis
jdx 93b4000
docs: move task tips to task docs, remove duplicates from tips page
jdx 6a35c1e
docs: address PR review feedback
jdx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -165,6 +165,76 @@ common running mise in a CI environment like GitHub Actions. | |||||||||||||||
|
|
||||||||||||||||
| See [GitHub Tokens](/dev-tools/github-tokens.html) for how to configure authentication and avoid rate limits. | ||||||||||||||||
|
|
||||||||||||||||
| ## Tool not found after `mise install` or `mise use` in a script | ||||||||||||||||
|
|
||||||||||||||||
| If you run `mise use` or `mise install` inside a script and then immediately try to use the | ||||||||||||||||
| tool, it may not be found. This is because `mise activate` updates PATH at the next prompt, | ||||||||||||||||
| which never happens in a script. | ||||||||||||||||
|
|
||||||||||||||||
| **Solutions:** | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| # Option 1: Use mise exec (recommended) | ||||||||||||||||
| mise install | ||||||||||||||||
| mise exec -- my-tool --version | ||||||||||||||||
|
|
||||||||||||||||
| # Option 2: Re-evaluate the environment after install | ||||||||||||||||
| mise install | ||||||||||||||||
| eval "$(mise hook-env)" | ||||||||||||||||
| my-tool --version | ||||||||||||||||
|
|
||||||||||||||||
| # Option 3: Use shims (they always resolve dynamically) | ||||||||||||||||
| export PATH="$HOME/.local/share/mise/shims:$PATH" | ||||||||||||||||
| mise install | ||||||||||||||||
| my-tool --version | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| ## Creating `~/.bash_profile` breaks existing `~/.profile` on Ubuntu/Debian | ||||||||||||||||
|
|
||||||||||||||||
| On many Linux distributions, `~/.profile` sources `~/.bashrc` and sets up your environment. | ||||||||||||||||
| However, if `~/.bash_profile` exists, bash reads that **instead of** `~/.profile`. | ||||||||||||||||
|
|
||||||||||||||||
| If you followed setup instructions that created `~/.bash_profile` for mise, your existing | ||||||||||||||||
| `~/.profile` configuration (including PATH, environment variables, etc.) may stop loading. | ||||||||||||||||
|
|
||||||||||||||||
| **Fix:** Add mise activation to `~/.bashrc` instead, or source `~/.profile` from your | ||||||||||||||||
| `~/.bash_profile`: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| # ~/.bash_profile | ||||||||||||||||
| [[ -f ~/.profile ]] && source ~/.profile | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| ## Tasks with `redact` env vars break `raw` output | ||||||||||||||||
|
|
||||||||||||||||
| If you have `redact = true` on any env var in your config, tasks with `raw = true` will appear | ||||||||||||||||
| to produce no output. This is because mise intercepts stdout/stderr to perform redaction, which | ||||||||||||||||
| conflicts with raw mode. | ||||||||||||||||
|
|
||||||||||||||||
| **Workaround**: Remove `redact` from env vars that don't need it, or accept that raw tasks | ||||||||||||||||
| won't produce visible output when redactions are active. | ||||||||||||||||
|
|
||||||||||||||||
| ## `mise activate` in CI / non-interactive shells | ||||||||||||||||
|
|
||||||||||||||||
| `mise activate` hooks into the shell prompt to update PATH, so historically it didn't work | ||||||||||||||||
| in non-interactive shells. With the addition of `chpwd` support, it does work in more | ||||||||||||||||
| situations now, but we still recommend these approaches for CI and scripts: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| # Option 1: Use shims (recommended for CI) | ||||||||||||||||
|
Comment on lines
+223
to
+224
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Option 1 uses
Suggested change
References
|
||||||||||||||||
| export PATH="$HOME/.local/share/mise/shims:$PATH" | ||||||||||||||||
| # In GitHub Actions, use: echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH | ||||||||||||||||
|
|
||||||||||||||||
| # Option 2: Use mise exec | ||||||||||||||||
| mise exec -- npm test | ||||||||||||||||
|
|
||||||||||||||||
| # Option 3: Manually call hook-env after activate | ||||||||||||||||
| eval "$(mise activate bash)" | ||||||||||||||||
| eval "$(mise hook-env)" | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| See also the [CI/CD section](/tips-and-tricks.html#ci-cd) in Tips & Tricks. | ||||||||||||||||
|
|
||||||||||||||||
| ## Auto-install on command not found handler does not work for new tools | ||||||||||||||||
|
|
||||||||||||||||
| If you are expecting mise to automatically install a tool when you run a command that is not found (using the [`not_found_auto_install`](/configuration/settings.html#not_found_auto_install) feature), be aware of an important limitation: | ||||||||||||||||
|
|
||||||||||||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.