Skip to content

Commit

Permalink
GH-44749: [CI][Dev] Apply ShellCheck lint to ci/scripts/c_glib_test.sh (
Browse files Browse the repository at this point in the history
#44750)

### Rationale for this change

```console
$ pre-commit run --show-diff-on-failure --color=always --all-files shellcheck
ShellCheck v0.10.0.......................................................Failed
- hook id: shellcheck
- exit code: 1

In ci/scripts/c_glib_test.sh line 25:
: ${ARROW_GLIB_VAPI:=true}
  ^----------------------^ SC2223 (info): This default assignment may cause DoS due to globbing. Quote it.

In ci/scripts/c_glib_test.sh line 37:
pushd ${source_dir}
      ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
pushd "${source_dir}"

In ci/scripts/c_glib_test.sh line 54:
pushd ${build_dir}
      ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
pushd "${build_dir}"

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
  https://www.shellcheck.net/wiki/SC2223 -- This default assignment may cause...
```

### What changes are included in this PR?

* Add missing quotes.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: #44749

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
  • Loading branch information
kou authored Nov 18, 2024
1 parent 99bdb80 commit 4c2aef7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,5 @@ repos:
files: >-
(
?^ci/scripts/c_glib_build\.sh$|
?^ci/scripts/c_glib_test\.sh$|
)
6 changes: 3 additions & 3 deletions ci/scripts/c_glib_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set -ex
source_dir=${1}/c_glib
build_dir=${2}/c_glib

: ${ARROW_GLIB_VAPI:=true}
: "${ARROW_GLIB_VAPI:=true}"

export DYLD_LIBRARY_PATH=${ARROW_HOME}/lib:${DYLD_LIBRARY_PATH}
export LD_LIBRARY_PATH=${ARROW_HOME}/lib:${LD_LIBRARY_PATH}
Expand All @@ -34,7 +34,7 @@ if [ -z "${ARROW_DEBUG_MEMORY_POOL}" ]; then
export ARROW_DEBUG_MEMORY_POOL=trap
fi

pushd ${source_dir}
pushd "${source_dir}"

ruby test/run-test.rb

Expand All @@ -51,7 +51,7 @@ fi

popd

pushd ${build_dir}
pushd "${build_dir}"
example/build
example/extension-type
if [ "${ARROW_GLIB_VAPI}" = "true" ]; then
Expand Down

0 comments on commit 4c2aef7

Please sign in to comment.