Repository navigation
fix indirect default expansion under nounset - #788
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 923b317d01
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d07ff9bb44
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
set -uso${!name:-word}lets the outer operator handle an unset target instead of failing early:?diagnostics using the outer indirect operand nameRoot Cause
Simple indirect targets were resolved eagerly under nounset. When the referenced variable was unset, gbash raised
unbound variablefor the resolved target before outer operators like:-or:?could apply.Validation
go test ./shell/expand ./internal/shell/interpmake lint