Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SC3036 false positive on ash (In Dash, echo flags besides -n are not supported) #3100

Open
2 tasks done
felipecrs opened this issue Dec 11, 2024 · 0 comments
Open
2 tasks done

Comments

@felipecrs
Copy link
Contributor

For bugs

Here's a snippet or screenshot that shows the problem:

# shellcheck shell=ash

echo -e "\nhi\nthere\nyou"

Here's what shellcheck currently says:

echo -e "\nhi\nthere\nyou"
     ^-- [SC3036](https://www.shellcheck.net/wiki/SC3036) (error): In dash, echo flags besides -n not supported.

Here's what I wanted or expected to see:

Nothing, as this is supported:

$ docker run --rm -it alpine ash -c 'echo -e "\nhi\nthere\nyou"'

hi
there
you
$ docker run --rm -it busybox sh -c 'echo -e "\nhi\nthere\nyou"

hi
there
you
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant