Commit 9dfc3af
authored
### Rationale for this change
This is the sub issue #44748.
* SC2048: Use "$@" (with quotes) to prevent whitespace problems.
* SC2181: Check exit code directly with e.g. if mycmd;, not indirectly with $?.
```
In ci/scripts/util_download_apache.sh line 47:
for mirror in ${APACHE_MIRRORS[*]}
^------------------^ SC2048 (warning): Use "${array[@]}" (with quotes) to prevent whitespace problems.
In ci/scripts/util_download_apache.sh line 50:
if [ $? == 0 ]; then
^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
For more information:
https://www.shellcheck.net/wiki/SC2048 -- Use "${array[@]}" (with quotes) t...
https://www.shellcheck.net/wiki/SC2181 -- Check exit code directly with e.g...
```
### What changes are included in this PR?
* SC2048: Use `"${APACHE_MIRRORS[@]}"` instead of `${APACHE_MIRRORS[*]}`.
* Sc2181: Use `if cmd ; then` statement instead of `$?`.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* GitHub Issue: #48174
Authored-by: Hiroyuki Sato <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
1 parent 303d077 commit 9dfc3af
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
50 | | - | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
0 commit comments