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

No errors if $SHELL is executed directly #2724

Open
2 tasks done
hyperupcall opened this issue Mar 24, 2023 · 0 comments
Open
2 tasks done

No errors if $SHELL is executed directly #2724

hyperupcall opened this issue Mar 24, 2023 · 0 comments

Comments

@hyperupcall
Copy link

For bugs

Here's a snippet or screenshot that shows the problem:

# shellcheck shell=bash

$SHELL --version

$any_var --version

Here's what shellcheck currently says:

Nothing

Here's what I wanted or expected to see:

Expected to have error that $SHELL is not quoted. Although the value is usually /usr/bin/bash, it could very well be some long directory that includes whitespace.

No warnings show up for $any_var either - I suppose this was done because people combine the command path and its flags in the same variable and having a lint would cause more trouble than it's worth? Although I disagree, I'm not asking to change other variables since it's behavior is not unreasonable.

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