Can't follow non-constant source. Use a directive to specify location. Open
- Read upRead up
- Exclude checks
Can't follow non-constant source. Use a directive to specify location.
# shellcheck source=src/lib.sh . "$(find_install_dir)/lib.sh"
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.
If you don't care that ShellCheck is unable to account for the file, specify
# shellcheck source=/dev/null.
Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.