SC1090 – ShellCheck Wiki

See this page on GitHub


Can't follow non-constant source. Use a directive to specify location.

Problematic code:

. "${util_path}"

Correct code:

# shellcheck source=src/
. "${util_path}"


ShellCheck is not able to include sourced files from paths that are determined at runtime. The file will not be read, potentially resulting in warnings about unassigned variables and similar.

Use a Directive to point shellcheck to a fixed location it can read instead.

ShellCheck v0.7.2+ will strip a single expansion followed by a slash, e.g. ${var}/ or $(dirname "${BASH_SOURCE[0]}")/, and treat them as ./ This allowing the use of source-path directives or -P flags to specify the a location.


If you don't care that ShellCheck is unable to account for the file, specify # shellcheck source=/dev/null.

ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.