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.
|
||||
likelyExecutablesInPath :: IO [String]
|
||||
likelyExecutablesInPath = do
|
||||
pathdirs <- splitOneOf "[:;]" `fmap` getEnvSafe "PATH"
|
||||
pathdirs <- splitOneOf ":;" `fmap` getEnvSafe "PATH"
|
||||
pathfiles <- concat `fmap` mapM getDirectoryContentsSafe pathdirs
|
||||
return $ nubSort pathfiles
|
||||
-- exclude directories and files without execute permission.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user