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:
|
### Problematic code:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
[[ -e ~/.bashrc -a \( -x /bin/dash -o -x /bin/ash \) ]]
|
[[ -e ~/.bashrc && \( -x /bin/dash || -x /bin/ash \) ]]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Correct code:
|
### Correct code:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
[[ -e ~/.bashrc -a ( -x /bin/dash -o -x /bin/ash ) ]]
|
[[ -e ~/.bashrc && ( -x /bin/dash || -x /bin/ash ) ]]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Rationale:
|
### Rationale:
|
||||||
|
Reference in New Issue
Block a user