-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
For bugs with existing features
- Rule Id: SC2317
- My shellcheck version: 0.10.0
- The rule's wiki page does not already cover this
- I tried on https://www.shellcheck.net/ and verified that this is still a problem on the latest commit
Here's a snippet or screenshot that shows the problem:
#!/bin/sh
return 1 || exit 1or
#!/bin/sh
return 1 2>/dev/null || exit 1Here's what shellcheck currently says:
return 1 || exit 1
^-- [SC2317](https://www.shellcheck.net/wiki/SC2317) (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
Here's what I wanted or expected to see:
This should return 1 if in a function and exit otherwise (when return fails).
It should not raise any warnings.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels