Skip to content

Files

Latest commit

 

History

History
28 lines (18 loc) · 658 Bytes

SC2187.md

File metadata and controls

28 lines (18 loc) · 658 Bytes

Pattern: Use of unsupported ash shell

Issue: -

Description

ShellCheck has no first class support for ash, but it does support its Debian fork dash and defaults to this whenever ash is specified.

Unfortunately, while the two are similar, they are not completely compatible. For example, ash supports echo -e but dash does not, so ShellCheck will incorrectly warn about it.

Example of incorrect code:

#!/bin/ash
echo "Hello World"

Example of correct code:

#!/bin/ash
# shellcheck shell=dash
echo "Hello World"

Further Reading