-
-
Notifications
You must be signed in to change notification settings - Fork 960
feat(set): add -E/--env flag to mise set command #6291
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
5 commits
Select commit
Hold shift + click to select a range
1313d95
feat(cli): add -E/--env flag to mise set command
e3fce22
[autofix.ci] apply automated fixes
autofix-ci[bot] 61ef125
fix(cli): make error handling consistent in set command
9d27ec4
fix(cli): respect -E flag for read operations in set command
641f4a8
Merge branch 'main' into feat/add-env-flag-to-set-command
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
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 |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Create an initial mise.toml file to reproduce the issue | ||
| echo '[tools] | ||
| node = "20"' >mise.toml | ||
|
|
||
| # This should create mise.pp.toml (environment-specific) instead of modifying mise.toml | ||
| # Currently this fails because the -E flag doesn't exist | ||
| if mise set -E pp NODE_ENV=production 2>/dev/null; then | ||
| # If the command succeeded, check if it created the environment-specific file | ||
| if [[ -f "mise.pp.toml" ]]; then | ||
| assert "cat mise.pp.toml" '[env] | ||
| NODE_ENV = "production"' | ||
| # Ensure original mise.toml wasn't modified | ||
| assert "cat mise.toml" '[tools] | ||
| node = "20"' | ||
| else | ||
| echo "ERROR: mise set -E pp should create mise.pp.toml but it doesn't exist" | ||
| exit 1 | ||
| fi | ||
| else | ||
| echo "Expected: mise set -E flag should exist and work" | ||
| echo "Actual: mise set command doesn't support -E flag" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Cleanup | ||
| rm -f mise.toml mise.pp.toml |
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
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.