This is an automated email from the ASF dual-hosted git repository.
raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 407841e6b6 GH-51283: [CI][Dev] Fix shellcheck errors in
cpp/thirdparty/download_dependencies.sh (#51284)
407841e6b6 is described below
commit 407841e6b626c5487ceb17c61e72707ce6027719
Author: Hiroyuki Sato <[email protected]>
AuthorDate: Fri Sep 11 00:19:27 2026 +0900
GH-51283: [CI][Dev] Fix shellcheck errors in
cpp/thirdparty/download_dependencies.sh (#51284)
### Rationale for this change
This is the sub issue #44748.
* SC2086: Double quote to prevent globbing and word splitting.
```
shellcheck cpp/thirdparty/download_dependencies.sh
In cpp/thirdparty/download_dependencies.sh line 49:
source ${SOURCE_DIR}/versions.txt
^-----------^ SC2086 (info): Double quote to prevent globbing and
word splitting.
Did you mean:
source "${SOURCE_DIR}"/versions.txt
For more information:
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent
globbing ...
```
### What changes are included in this PR?
* SC2086: Quote variables.
* Use wildcard file matching instead of specifying each file individually.
### Are these changes tested?
Yes
### Are there any user-facing changes?
No.
* GitHub Issue: #51283
Authored-by: Hiroyuki Sato <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
---
.pre-commit-config.yaml | 6 ++----
cpp/thirdparty/download_dependencies.sh | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index b47ce4ac02..b3216a3dab 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -287,10 +287,8 @@ repos:
?^cpp/build-support/.*\.sh$|
?^cpp/examples/minimal_build/run\.sh$|
?^cpp/examples/tutorial_examples/run\.sh$|
- ?^cpp/src/arrow/flight/sql/odbc/install/mac/postinstall$|
- ?^cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc\.sh$|
- ?^cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc_ini\.sh$|
-
?^cpp/src/arrow/flight/sql/odbc/tests/dremio/set_up_dremio_instance\.sh$|
+ ?^cpp/src/arrow/flight/.*\.sh$|
+ ?^cpp/thirdparty/download_dependencies\.sh$|
?^dev/release/05-binary-upload\.sh$|
?^dev/release/07-flightsqlodbc-upload\.sh$|
?^dev/release/08-publish-gh-release\.sh$|
diff --git a/cpp/thirdparty/download_dependencies.sh
b/cpp/thirdparty/download_dependencies.sh
index de6c5b5b88..e55666beae 100755
--- a/cpp/thirdparty/download_dependencies.sh
+++ b/cpp/thirdparty/download_dependencies.sh
@@ -48,7 +48,7 @@ main() {
mkdir -p "${DESTDIR}"
# Load `DEPENDENCIES` variable.
- source ${SOURCE_DIR}/versions.txt
+ source "${SOURCE_DIR}/versions.txt"
echo "# Environment variables for offline Arrow build"
for ((i = 0; i < ${#DEPENDENCIES[@]}; i++)); do