pratyushadk opened a new pull request, #50804:
URL: https://github.com/apache/arrow/pull/50804
### Rationale for this change
This is a sub-issue of #44748.
Fix all errors reported by `shellcheck` in `ci/scripts/r_windows_build.sh`.
### What changes are included in this PR?
The following shellcheck error codes are addressed:
- **SC2223**: Quoted the default variable assignments (`: ${VAR:=...}` → `:
"${VAR:=...}"`) to prevent unintended globbing on lines 22 and 29.
- **SC2155**: Split `export ARROW_HOME="$(cd ...)"` into two separate lines
(declare, then export) to avoid masking the return value of the `cd` subshell.
- **SC2034**: Removed the unused variable `RWINLIB_LIB_DIR="lib"` which was
declared but never referenced anywhere in the script.
- **SC2086**: Double-quoted all variable references used in path operations
to prevent globbing and word splitting.
- **SC2011 + SC2035**: Replaced `ls *.xz | xargs -n 1 tar -xJf` with `find .
-maxdepth 1 -name "*.xz" -print0 | xargs -0 -n 1 tar -xJf` to safely handle
non-alphanumeric filenames and prevent glob arguments from being treated as
flags.
- **SC2046**: Quoted the command substitution `$(echo "$MINGW_ARCH" | cut
...)` in the `mv` call to prevent word splitting on the result.
### Are these changes tested?
Verified by running `shellcheck v0.11.0` against the modified file locally.
The tool now exits with code **0** (no warnings or errors).
No functional logic was changed — all modifications are quoting and idiom
improvements only.
--
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]