mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
-a and -o are not valid in [[ .. ]]
@@ -3,13 +3,13 @@
|
||||
### Problematic code:
|
||||
|
||||
```sh
|
||||
[[ -e ~/.bashrc -a \( -x /bin/dash -o -x /bin/ash \) ]]
|
||||
[[ -e ~/.bashrc && \( -x /bin/dash || -x /bin/ash \) ]]
|
||||
```
|
||||
|
||||
### Correct code:
|
||||
|
||||
```sh
|
||||
[[ -e ~/.bashrc -a ( -x /bin/dash -o -x /bin/ash ) ]]
|
||||
[[ -e ~/.bashrc && ( -x /bin/dash || -x /bin/ash ) ]]
|
||||
```
|
||||
|
||||
### Rationale:
|
||||
|
Reference in New Issue
Block a user