mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC2187 (markdown)
25
SC2187.md
Normal file
25
SC2187.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
## Ash scripts will be checked as Dash. Add '# shellcheck shell=dash' to silence.
|
||||||
|
|
||||||
|
### Problematic code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
#!/bin/ash
|
||||||
|
echo "Hello World"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Correct code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
#!/bin/ash
|
||||||
|
# shellcheck shell=dash
|
||||||
|
echo "Hello World"
|
||||||
|
```
|
||||||
|
### Rationale:
|
||||||
|
|
||||||
|
ShellCheck has no first class support for `ash`, but it does support its Debian fork `dash` and defaults to this whenever `ash` is specified.
|
||||||
|
|
||||||
|
You can use a [[directive]] to let shellcheck know you're aware of this.
|
||||||
|
|
||||||
|
### Exceptions:
|
||||||
|
|
||||||
|
None.
|
Reference in New Issue
Block a user