fix(export): continue after invalid identifier to avoid stale env sync#1610
Merged
chaliy merged 1 commit intoMay 8, 2026
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 981276b | Commit Preview URL | May 08 2026, 09:20 PM |
7b9c0f0 to
981276b
Compare
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.
Motivation
env, but theexportbuiltin previously returned immediately on invalid identifiers causing later valid NAME=VALUE operands to be skipped and stale values to be exported.exportbehavior with Bash semantics and preserve readonly handling by making per-operand failures non-fatal to further argument processing.Description
crates/bashkit/src/builtins/export.rsto stop returning early on invalid identifiers and instead append an error tostderr, setexit_code = 1, andcontinueprocessing remaining args.exit_code = 1and continues).export_continues_after_invalid_identifier_and_exports_good_argsincrates/bashkit/tests/blackbox_security_tests.rsthat exercisesGOOD=old; export 1BAD=x GOOD=newand asserts the command exits nonzero whileGOODis updated and exported.Testing
cargo test -p bashkit --test blackbox_security_tests finding_readonly_bypass::export_continues_after_invalid_identifier_and_exports_good_argsand it passed (ok).Codex Task