add System.FilePath to this conversion

It seems to make sense to convert both System.Directory and
System.FilePath uses to OsPath in one go. This will generally look like
replacing RawFilePath with OsPath in type signatures, and will be driven
by the now absolutely massive pile of compile errors.

Got a few modules building in this new regime.

Sponsored-by: Jack Hill
This commit is contained in:
Joey Hess 2025-01-23 11:07:29 -04:00
parent 05bdce328d
commit c3c8870752
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 53 additions and 46 deletions

View file

@ -11,7 +11,6 @@ import Utility.SystemDirectory
import Utility.OsPath
import System.IO
import System.FilePath
type ConfigKey = String
data ConfigValue =
@ -106,8 +105,11 @@ findCmdPath k command = do
)
where
find d =
let f = d </> command
in ifM (doesFileExist (toOsPath f)) ( return (Just f), return Nothing )
let f = toOsPath d </> toOsPath command
in ifM (doesFileExist f)
( return (Just (fromOsPath f))
, return Nothing
)
quiet :: String -> String
quiet s = s ++ " >/dev/null 2>&1"