Open
Description
On 2021-09-18, @koalaman wrote:
ShellCheck has started supporting
env -S
I tested ShellCheck's support for env -S
at ShellCheck.net by entering the following code, which produced an SC2164 warning as expected:
#!/usr/bin/env -S bash
cd foo
As expected, the following code does not produce an SC2164 warning:
#!/usr/bin/env -S bash -e
cd foo
Unexpectedly, the following code also does not produce an SC2164 warning:
#!/usr/bin/env -S bash -o foobared
cd foo
It seems that the letter "e" in -o foobared
(as well as any lowercase "e" after env -S bash
) disables the SC2164 warning. When the letter "e" is removed from -o foobared
, the code does produce an SC2164 warning:
#!/usr/bin/env -S bash -o foobard
cd foo
Does ShellCheck not fully support env -S
?
Metadata
Metadata
Assignees
Labels
No labels