mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-15 01:23:07 -07:00
Treat $x/ or $(x)/ as ./ when finding sourced files (fixes #1998)
This commit is contained in:
parent
1b884a17ea
commit
210cdcd01a
4 changed files with 25 additions and 1 deletions
|
@ -229,6 +229,12 @@ prop_cantSourceDynamic =
|
|||
prop_cantSourceDynamic2 =
|
||||
[1090] == checkWithIncludes [("lib", "")] "source ~/foo"
|
||||
|
||||
prop_canStripPrefixAndSource =
|
||||
null $ checkWithIncludes [("./lib", "")] "source \"$MYDIR/lib\""
|
||||
|
||||
prop_canStripPrefixAndSource2 =
|
||||
null $ checkWithIncludes [("./utils.sh", "")] "source \"$(dirname \"${BASH_SOURCE[0]}\")/utils.sh\""
|
||||
|
||||
prop_canSourceDynamicWhenRedirected =
|
||||
null $ checkWithIncludes [("lib", "")] "#shellcheck source=lib\n. \"$1\""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue