kevinjqliu opened a new pull request, #3194:
URL: https://github.com/apache/iceberg-rust/pull/3194

   ## Which issue does this PR close?
   
   N/A. Found while running `dev/release/create_rc.sh` on macOS.
   
   ## What changes are included in this PR?
   
   `check_dependency_licenses` runs `cargo deny` inside a `( trap - ERR; cd 
"${REPO_ROOT}"; ... )` subshell. On macOS's default bash 3.2, clearing the trap 
in the subshell also stops the parent's ERR trap from firing, so when the 
license check fails the script exits with cargo's status but never prints 
`FAILED: Check dependency licenses`. The `trap - ERR` was there to avoid a 
double FAILED line on bash 5, where the subshell inherits the trap via `set -E`.
   
   - drop the subshell and pass `--manifest-path "${REPO_ROOT}/Cargo.toml"` 
instead, same as `cargo metadata` in `dev/release/dependencies.sh`
   - cargo now runs in the main shell, so the step reports exactly once on both 
bash 3.2 and bash 5
   
   The other `trap - ERR` subshells in this file (sign, checksum, header check) 
have the same problem. Leaving those for a follow up.
   
   ## Are these changes tested?
   
   Ran the script under `/bin/bash` 3.2 with a fake `cargo` on PATH that exits 
101 on `check license`:
   
   - before: exit 101, no FAILED line
   - after: exit 101, `FAILED: Check dependency licenses` printed once
   
   `bash -n` passes. Real `cargo deny --manifest-path .../Cargo.toml check 
license` from outside the repo root passes.
   
   ## AI Disclosure
   
   Written with Claude Code, reviewed by me.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to