From 9c6dca8b0793589bc93147e503403e56abe27f44 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Thu, 7 Oct 2021 14:22:08 -0700 Subject: [PATCH] Updated SC1091 (markdown) --- SC1091.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SC1091.md b/SC1091.md index 9f2d27d..e66788c 100644 --- a/SC1091.md +++ b/SC1091.md @@ -20,7 +20,7 @@ source somefile In case you do not have access to the file: ```sh -# shellcheck disable=SC1091 +# shellcheck source=/dev/null source somefile ``` @@ -34,4 +34,6 @@ Feel free to ignore the error with a [[directive]]. ### Exceptions: +ShellCheck is unable to follow dynamic paths, such as `source "$somedir/file"`. For these cases, see [[SC1090: Can't follow non-constant source. Use a directive to specify location|SC1090]] instead. You may be seeing SC1091 because ShellCheck tried to be helpful and strip a leading dynamic path element as described on that page. + If you're fine with it, ignore the message with a [[directive]].