bharos opened a new pull request, #13053: URL: https://github.com/apache/gravitino/pull/13053
### What changes were proposed in this pull request? In `dev/release/release-util.sh`: - `error` now writes to stderr. `read_config` returns its value on stdout, and every call site captures it with `$(...)`, so a fatal message written to stdout became the variable's value instead of being displayed. - The five `export VAR=$(read_config ...)` call sites are split into an assignment followed by `export`. `exit 1` inside a command substitution only ends the subshell, and `export` reports its own exit status (always 0), so `set -e` in `do-release.sh` never saw the failure. A bare assignment propagates it. `RC_COUNT` and `GIT_REF` already used the two-line form and were unaffected. ### Why are the changes needed? With `-y` and a required variable unset, the release script printed the error text as configuration and continued: ``` ASF USER: Force mode requires 'ASF user' to be set via environment variable ASF_USERNAME. GPG KEY: Force mode requires 'GPG key' to be set via environment variable GPG_KEY. FULL NAME: Force mode requires 'Full name' to be set via environment variable GIT_NAME. E-MAIL: Force mode requires 'ASF user' to be set via environment variable [email protected] ``` ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Ran `dev/release/mock/do-release.sh -b branch-1.3 -r 1 -y` with `ASF_USERNAME`, `GIT_NAME` and `GPG_KEY` unset. Before the change the run reached the interactive password prompt with all four identity fields holding the error text; after it, the message is printed once on stderr and the script exits with status 1. -- 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]
