-
-
Notifications
You must be signed in to change notification settings - Fork 943
feat: add env propagation #6342
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
11 commits
Select commit
Hold shift + click to select a range
4a7cad7
feat: add env propagation
Its-Just-Nans 425e77d
[autofix.ci] apply automated fixes
autofix-ci[bot] 6427076
fix: too much arguments
Its-Just-Nans 5f70e1a
fix: add to async
Its-Just-Nans 054fb49
fix test file
Its-Just-Nans fc52255
little better code (sweep under the carpet)
Its-Just-Nans 8f2ba4a
Merge branch 'main' into env-propagation
Its-Just-Nans 08dc7c0
rm usless clone
Its-Just-Nans feeadef
Merge branch 'env-propagation' of github.com:Its-Just-Nans/mise into …
Its-Just-Nans 5e42dda
add comment
Its-Just-Nans 7e93002
fix dummy typo
Its-Just-Nans 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| cat <<EOF >mise.toml | ||
| [tasks.echo] | ||
| env = { "SUB_TASK" = "sub_task_env" } | ||
| run = 'echo "\$SUB_TASK \$MY_VAR"' | ||
|
|
||
|
|
||
| [tasks.propagation] | ||
| run = [{ task = "echo" }] | ||
| env = { "MY_VAR" = "my_variable" } | ||
| EOF | ||
|
|
||
| assert_contains "mise run echo" "sub_task_env " # with trailing space | ||
| assert_contains "mise run propagation" "sub_task_env my_variable" |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Iterator Exhaustion Causes Empty Environment Variables
The
task_enviterator is consumed byenv.extend(task_env.clone()). This exhausts the iterator, causing the subsequenttask_env.collect()call to return an empty vector. As a result, environment variables are not correctly propagated to child tasks.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure on this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems there is no bug my dear bot