fix: typo in Hledger.Cli.CliOptions.likelyExecutablesInPath
This had a bug noticed by mauke in #haskell: it was splitting PATH on [ and ] as well as : and ;. Hard to trigger, but now fixed.
This commit is contained in:
parent
6b3dd79542
commit
a12880de05
@ -745,7 +745,7 @@ compiledExts = ["",".com",".exe"]
|
|||||||
-- We do not currently filter out non-file objects or files without execute permission.
|
-- We do not currently filter out non-file objects or files without execute permission.
|
||||||
likelyExecutablesInPath :: IO [String]
|
likelyExecutablesInPath :: IO [String]
|
||||||
likelyExecutablesInPath = do
|
likelyExecutablesInPath = do
|
||||||
pathdirs <- splitOneOf "[:;]" `fmap` getEnvSafe "PATH"
|
pathdirs <- splitOneOf ":;" `fmap` getEnvSafe "PATH"
|
||||||
pathfiles <- concat `fmap` mapM getDirectoryContentsSafe pathdirs
|
pathfiles <- concat `fmap` mapM getDirectoryContentsSafe pathdirs
|
||||||
return $ nubSort pathfiles
|
return $ nubSort pathfiles
|
||||||
-- exclude directories and files without execute permission.
|
-- exclude directories and files without execute permission.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user