Add env section to bundle scripts for DABs interpolation#5299
Draft
shreyas-goenka wants to merge 1 commit into
Draft
Add env section to bundle scripts for DABs interpolation#5299shreyas-goenka wants to merge 1 commit into
shreyas-goenka wants to merge 1 commit into
Conversation
scripts.<name> now accepts an env: map whose values may reference
${bundle.*}, ${workspace.*}, and ${var.*}. The script content is still
passed to the shell as-is (no DABs interpolation), removing the ambiguity
between bundle variables and shell variables that previously forced all
${...} usage to be rejected.
When an env value references an unsupported prefix (e.g. ${resources.*}),
validation reports a clear error pointing at the field. The content-side
error now suggests the new env section instead of just stating ${...} is
unsupported.
Fixes #4179
Co-authored-by: Isaac
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #4179.
scripts.<name>now accepts anenv:map whose values may reference${bundle.*},${workspace.*}, and${var.*}. Scriptcontentis still passed to the shell as-is (no DABs interpolation), removing the ambiguity between bundle variables and shell variables that previously forced all${...}usage to be rejected.\${resources.*}), validation reports a clear error pointing at the offending env entry.env:instead of just stating\${...}is unsupported.The allowed prefixes (
bundle,workspace,var/variables) matchdefaultPrefixesused by `ResolveVariableReferencesWithoutResources`, so values are already resolved by the time `bundle run` invokes the script.Test plan
This pull request was AI-assisted by Isaac.