OsPath transition Windows build fixes
This gets it building on Windows again, with 1 test suite failure (addurl). Sponsored-by: Kevin Mueller
This commit is contained in:
parent
9dc43396b3
commit
a149336a59
23 changed files with 58 additions and 62 deletions
|
@ -21,10 +21,6 @@ import Utility.Exception
|
|||
import Utility.PartialPrelude
|
||||
#endif
|
||||
|
||||
#ifdef mingw32_HOST_OS
|
||||
import System.FilePath
|
||||
#endif
|
||||
|
||||
shellPath :: FilePath
|
||||
shellPath = "/bin/sh"
|
||||
|
||||
|
@ -46,13 +42,13 @@ findShellCommand f = do
|
|||
Just ('#':'!':rest) -> case words rest of
|
||||
[] -> defcmd
|
||||
(c:ps) -> do
|
||||
let ps' = map Param ps ++ [File f]
|
||||
let ps' = map Param ps ++ [File (fromOsPath f)]
|
||||
-- If the command is not inSearchPath,
|
||||
-- take the base of it, and run eg "sh"
|
||||
-- which in some cases on windows will work
|
||||
-- despite it not being inSearchPath.
|
||||
ok <- inSearchPath c
|
||||
return (if ok then c else takeFileName c, ps')
|
||||
return (if ok then c else fromOsPath (takeFileName (toOsPath c)), ps')
|
||||
_ -> defcmd
|
||||
#endif
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue