start converting from System.Directory to System.OsPath
This is the start of a long road, got the first few files to compile after this large change. Sponsored-by: mycroft
This commit is contained in:
parent
d46504e51e
commit
05bdce328d
8 changed files with 185 additions and 47 deletions
|
@ -11,6 +11,7 @@ import Utility.SafeCommand
|
|||
import Utility.Env.Basic
|
||||
import qualified Git.Version
|
||||
import Utility.SystemDirectory
|
||||
import Utility.OsPath
|
||||
|
||||
import Control.Monad
|
||||
import Control.Applicative
|
||||
|
@ -91,11 +92,11 @@ getSshConnectionCaching = Config "sshconnectioncaching" . BoolConfig <$>
|
|||
|
||||
setup :: IO ()
|
||||
setup = do
|
||||
createDirectoryIfMissing True tmpDir
|
||||
createDirectoryIfMissing True (toOsPath tmpDir)
|
||||
writeFile testFile "test file contents"
|
||||
|
||||
cleanup :: IO ()
|
||||
cleanup = removeDirectoryRecursive tmpDir
|
||||
cleanup = removeDirectoryRecursive (toOsPath tmpDir)
|
||||
|
||||
run :: [TestCase] -> IO ()
|
||||
run ts = do
|
||||
|
|
|
@ -8,6 +8,7 @@ import Utility.Path
|
|||
import Utility.Monad
|
||||
import Utility.SafeCommand
|
||||
import Utility.SystemDirectory
|
||||
import Utility.OsPath
|
||||
|
||||
import System.IO
|
||||
import System.FilePath
|
||||
|
@ -106,7 +107,7 @@ findCmdPath k command = do
|
|||
where
|
||||
find d =
|
||||
let f = d </> command
|
||||
in ifM (doesFileExist f) ( return (Just f), return Nothing )
|
||||
in ifM (doesFileExist (toOsPath f)) ( return (Just f), return Nothing )
|
||||
|
||||
quiet :: String -> String
|
||||
quiet s = s ++ " >/dev/null 2>&1"
|
||||
|
|
|
@ -73,4 +73,4 @@ writeVersion ver = catchMaybeIO (F.readFile' f) >>= \case
|
|||
, ""
|
||||
]
|
||||
footer = []
|
||||
f = toOsPath "Build/Version"
|
||||
f = literalOsPath "Build/Version"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue