on master help sign in
Use System.FilePath.searchPathSeparator.
166760fSteven Shaw
src/Util/System.hs+5−5
@@ -37,7 +37,8 @@ import System.IO.Error
37
37
38#ifdef FREESTANDING
38#ifdef FREESTANDING
39import Tools_idris
39import Tools_idris
40+import Data.List (intercalate)
40−import System.FilePath (isAbsolute, dropFileName)
41+import System.FilePath (isAbsolute, dropFileName, searchPathSeparator)
41import System.Directory (doesDirectoryExist)
42import System.Directory (doesDirectoryExist)
42import System.Environment (getEnv, setEnv, getExecutablePath)
43import System.Environment (getEnv, setEnv, getExecutablePath)
43#endif
44#endif
@@ -109,11 +110,10 @@ setupBundledCC = when hasBundledToolchain
109 if absolute
110 if absolute
110 then tcDir
111 then tcDir
111 else dropFileName exePath ++ tcDir
112 else dropFileName exePath ++ tcDir
112− let pathSep = if isWindows then ";" else ":"
113 present <- doesDirectoryExist target
113 present <- doesDirectoryExist target
114− when present
114+ when present $ do
115− $ do newPath <- return $ target ++ pathSep ++ path
115+ newPath <- return $ intercalate [searchPathSeparator] [target, path]
116− setEnv "PATH" newPath
116+ setEnv "PATH" newPath
117#else
117#else
118setupBundledCC = return ()
118setupBundledCC = return ()
119#endif
119#endif