You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, environment variables can be unexported at the justfile level, using unexport. This will unexport the environment variable for all recipes:
unexportGIT_EXTERNAL_DIFFunexportGIT_PAGER# only this recipe should not have GIT_EXTERNAL_DIFF and GIT_PAGER exporteddiff-delta:
git diff | delta --line-numbers
# and this recipe should respect the parent shell's GIT_EXTERNAL_DIFF and GIT_PAGER, but won't due to the unexport statementsdiff-default:
git diff
In some cases it is helpful to unexport (in a cross-platform way) an environment variable (or a list of environment variables) for only a specific recipe. One workaround is to use submodules, e.g. justfile-git-defaults.just and justfile-git-overrides.just, but this feels cumbersome.
Ideally, it would be nice to be able to unexport using an attribute:
Seems to me that this issue should be combined with #2408 - the actual desired feature is a way to scope anything one can currently do with just variables to a single recipe (or maybe a group of recipes?), whether that's exporting, unexporting, etc.
Currently, environment variables can be unexported at the justfile level, using unexport. This will unexport the environment variable for all recipes:
In some cases it is helpful to unexport (in a cross-platform way) an environment variable (or a list of environment variables) for only a specific recipe. One workaround is to use submodules, e.g.
justfile-git-defaults.just
andjustfile-git-overrides.just
, but this feels cumbersome.Ideally, it would be nice to be able to unexport using an attribute:
Related:
The text was updated successfully, but these errors were encountered: