Repository navigation
feat(env): --json prints the change the env and dev lines make - #326
Merged
Merged
Conversation
eb-local runs the lines in a bash child and prints how its environment then differs from the caller's, as set and unset lists in one line of JSON. A shell that cannot evaluate POSIX text applies that; the reference has a nushell wrapper. Shell functions such as Lmod's module are not variables and do not cross over.
Pygments has no nu lexer, and the site build treats the warning as an error.
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.
eb-local env --jsonandeb-local dev --jsonrun their lines in a bash child and print how its environment then differs from the caller's, in place of the lines:{"schema_version":1,"kind":"env","set":[{"name":"EESSI_USER_INSTALL","value":"/home/u/eessi"}],"unset":["EASYBUILD_PREFIX"]}setandunsetare sorted by name. A variable the caller already has with the same value is in neither._,SHLVL,PWD,OLDPWD) and exported functions (BASH_FUNC_*) are left out.from json,load-env,hide-env), checked with nu 0.117.0.Only variables cross over. Lmod's
modulefunction stays in the bash child, so modules are named on thedevline.Checked
The
zigworkflow on the branch: 572 tests on x86_64 and aarch64 (570 onmain), the same 17 skipped. Two new tests:env --jsonagainst a caller environment with variables the lines unset and keep, anddev --json.Closes #325