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

shfmt still complains that " &> redirects are a bash/mksh feature" although it parses the script as bash #1102

Open
coiby opened this issue Oct 14, 2024 · 0 comments

Comments

@coiby
Copy link

coiby commented Oct 14, 2024

Problem

shfmt makes the following complaint,

&> redirects are a bash/mksh feature (parsed as bash via -ln=auto)

which doesn't sound reasonable to me because the script is already parsed as bash

How to reproduce it

cat << 'EOF' > test.sh
#!/bin/bash
echo test 1 &>2
EOF


cat << 'EOF' > .editorconfig
root = true

[*]
shell_variant = posix
EOF

if ! shfmt -d test.sh; then
    echo "test failed"
fi
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