You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 bashcd foo
As expected, the following code does not produce an SC2164 warning:
#!/usr/bin/env -S bash -ecd foo
Unexpectedly, the following code also does not produce an SC2164 warning:
#!/usr/bin/env -S bash -o foobaredcd 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 foobardcd foo
Does ShellCheck not fully support env -S?
The text was updated successfully, but these errors were encountered:
On 2021-09-18, @koalaman wrote:
I tested ShellCheck's support for
env -S
at ShellCheck.net by entering the following code, which produced an SC2164 warning as expected:As expected, the following code does not produce an SC2164 warning:
Unexpectedly, the following code also does not produce an SC2164 warning:
It seems that the letter "e" in
-o foobared
(as well as any lowercase "e" afterenv -S bash
) disables the SC2164 warning. When the letter "e" is removed from-o foobared
, the code does produce an SC2164 warning:Does ShellCheck not fully support
env -S
?The text was updated successfully, but these errors were encountered: