with the following minimal[^1] reproducible example:
$ cat file.sh
case $PATH in
:"$(dirname foo)")
esac
$ shellharden file.sh
file.sh: Unexpected end of file
The file's end was reached without closing all sytactic scopes.
Either, the parser got lost, or the file is truncated or malformed.
$ echo $?
1
[^1]: Less minimally, I found this while creating a case to ensure *:/usr/local/share/"$(command basename -- "${SHELL%%[0-9-]*}")"/site-functions:* was in ":${FPATH-}:"
with the following minimal[^1] reproducible example:
[^1]: Less minimally, I found this while creating a
case
to ensure*:/usr/local/share/"$(command basename -- "${SHELL%%[0-9-]*}")"/site-functions:*
was in":${FPATH-}:"