mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-20 13:23:55 -07:00
Add support for source-path directives (fixes #1577)
This commit is contained in:
parent
aa4b24e458
commit
d9e419d60f
7 changed files with 67 additions and 17 deletions
|
@ -471,7 +471,7 @@ ioInterface options files = do
|
|||
first <- a arg
|
||||
if not first then return False else b arg
|
||||
|
||||
findSourceFile inputs sourcePaths currentScript original =
|
||||
findSourceFile inputs sourcePathFlag currentScript sourcePathAnnotation original =
|
||||
if isAbsolute original
|
||||
then
|
||||
let (_, relative) = splitDrive original
|
||||
|
@ -481,7 +481,7 @@ ioInterface options files = do
|
|||
where
|
||||
find filename deflt = do
|
||||
sources <- filterM ((allowable inputs) `andM` doesFileExist)
|
||||
(map (</> filename) $ map adjustPath sourcePaths)
|
||||
(map (</> filename) $ map adjustPath $ sourcePathFlag ++ sourcePathAnnotation)
|
||||
case sources of
|
||||
[] -> return deflt
|
||||
(first:_) -> return first
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue