SC2164

The ShellCheck warning for a cd whose failure is not handled, so the script would carry on in the wrong directory.

In more detail

Write cd dir || exit, or run the script under set -e, so a failed cd stops the script. Otherwise later commands, perhaps an rm, act on files in the wrong directory.

Related terms

Taught in

References