shellcheck icon indicating copy to clipboard operation
shellcheck copied to clipboard

Warn on nonfinal exec

Open mcandre opened this issue 4 months ago • 0 comments

For bugs with existing features

  • Rule Id (if any, e.g. SC1000):
  • My shellcheck version (shellcheck --version or "online"):
  • [x] The rule's wiki page does not already cover this (e.g. https://shellcheck.net/wiki/SC2086)
  • [x] 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
exec hello
echo goodbye

Here's what shellcheck currently says:

(Nothing)

Here's what I wanted or expected to see:

Warning: exec skips successive commands.

mcandre avatar Sep 11 '25 18:09 mcandre