You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Rationale for this change
```bash
❯ pre-commit run --show-diff-on-failure --color=always --all-files shellcheck
ShellCheck v0.10.0.......................................................Failed
- hook id: shellcheck
- exit code: 1
In c_glib/test/run-test.sh line 20:
test_dir="$(cd $(dirname $0); pwd)"
^--------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
^-----------^ SC2046 (warning): Quote this to prevent word splitting.
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
test_dir="$(cd $(dirname "$0") || exit; pwd)"
In c_glib/test/run-test.sh line 50:
MODULE_TYPELIB_DIR_VAR_NAME="$(echo ${module} | tr a-z- A-Z_)_TYPELIB_DIR"
^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
MODULE_TYPELIB_DIR_VAR_NAME="$(echo "${module}" | tr a-z- A-Z_)_TYPELIB_DIR"
In c_glib/test/run-test.sh line 77:
${DEBUGGER} "${DEBUGGER_ARGS[@]}" "${RUBY}" ${test_dir}/run-test.rb "$@"
^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
${DEBUGGER} "${DEBUGGER_ARGS[@]}" "${RUBY}" "${test_dir}"/run-test.rb "$@"
For more information:
<https://www.shellcheck.net/wiki/SC2046> -- Quote this to prevent word splitt...
<https://www.shellcheck.net/wiki/SC2164> -- Use 'cd ... || exit' or 'cd ... |...
<https://www.shellcheck.net/wiki/SC2086> -- Double quote to prevent globbing ...
```
### What changes are included in this PR?
- add missing double quotes(SC2046,SC2086)
- Use cd ... || exit in case cd fails.(SC2164)
### Are these changes tested?
yes
### Are there any user-facing changes?
no
* GitHub Issue: apache#45050
Lead-authored-by: takaaki.koike <[email protected]>
Co-authored-by: Takaaki Koike <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
0 commit comments