SC2154

The ShellCheck warning for a variable that is used but never assigned in the file, often a typo or a value expected from the environment.

In more detail

If the variable really comes from outside, such as an exported setting, document it or give it a default with ${name:-}. Otherwise it is usually a misspelled name, and set -u would stop the script there.

Related terms

Taught in

References