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

require-double-brackets doesn't work in BusyBox sh even though [[ is supported #2967

Closed
1 of 2 tasks
GrantGryczan opened this issue Apr 19, 2024 · 3 comments
Closed
1 of 2 tasks

Comments

@GrantGryczan
Copy link

GrantGryczan commented Apr 19, 2024

For bugs

  • Rule Id (if any, e.g. SC1000): SC2292
  • My shellcheck version (shellcheck --version or 'online'): online
  • I tried on shellcheck.net and verified that this is still a problem on the latest commit
  • It's not reproducible on shellcheck.net, but I think that's because it's an OS, configuration or encoding issue

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

#!/bin/busybox sh
# shellcheck enable=require-double-brackets

[ -e /etc/issue ]

Here's what shellcheck currently says:

Nothing.

Here's what I wanted or expected to see:

Line 4	SC2292: Prefer [[ ]] over [ ] for tests.
@koalaman
Copy link
Owner

koalaman commented May 4, 2024

You're right of course. This test had not been updated for the recently added BusyBox support. Thanks!

Friendfishermans pushed a commit to Friendfishermans/shellcheck that referenced this issue May 6, 2024
@ale5000-git
Copy link

@koalaman
I'm using BusyBox for Windows and it does support glob matching.
I don't think the version for Linux would be so behind (maybe you have tried an outdated version).

@grische
Copy link
Contributor

grische commented Jun 10, 2024

@koalaman @ale5000-git I opened a new issue for the glob matching #2998

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

4 participants