For bugs with existing features
Here's a snippet or screenshot that shows the problem:
#!/bin/sh
return 1 || exit 1
or
#!/bin/sh
return 1 2>/dev/null || exit 1
Here'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.
For bugs with existing features
Here's a snippet or screenshot that shows the problem:
or
Here's what shellcheck currently says:
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.