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
{{ message }}
Repository navigation
shfmt still complains that " &> redirects are a bash/mksh feature" although it parses the script as bash #1102
Thanks for reporting this. As far as I can tell, the behavior in terms of parsing is correct - shell_variant = posix is applied from EditorConfig like a -ln=posix flag, so you are actually parsing in POSIX mode. It's the error message which is wrong and very confusing. I've fixed that now.
Activity
mvdan commentedon Oct 19, 2024
Thanks for reporting this. As far as I can tell, the behavior in terms of parsing is correct -
shell_variant = posixis applied from EditorConfig like a-ln=posixflag, so you are actually parsing in POSIX mode. It's the error message which is wrong and very confusing. I've fixed that now.cmd/shfmt: show broken behavior in test for #1102
cmd/shfmt: report correct language read from EditorConfig in errors
coiby commentedon Oct 22, 2024
Thanks for coming up with a fix quickly!
I have one question. In the reproducer, the shebang is
!/bin/bash. So do you imply EditConfig will overwrite shebang?chore(deps): update module mvdan.cc/sh/v3/cmd/shfmt to v3.12.0 (hetzn…