shellcheck
shellcheck copied to clipboard
SC2039 "In POSIX sh, echo flags are undefined." triggered for /bin/echo
For bugs
- Rule Id: SC2039
- My shellcheck version: integrated in hadolint 1.16.3
- [X] The rule's wiki page does not already cover this (e.g. https://shellcheck.net/wiki/SC2086)
- [X] I tried on shellcheck.net and verified that this is still a problem on the latest commit
Here's a snippet or screenshot that shows the problem:
#!/bin/sh
/bin/echo -e "test\ntest"
Here's what shellcheck currently says:
Line 2:
/bin/echo -e "test\ntest"
^-- SC2039: In POSIX sh, echo flags are undefined.
Here's what I wanted or expected to see:
When I use /bin/echo
it should not complain about "echo in POSIX sh", as I am using the binary and not the shell internal function.