more OsPath conversion

Git.Types now uses it, as does TopFilePath, making for plenty of new
compile errors needing fixing.

Sponsored-by: Brock Spratlen
This commit is contained in:
Joey Hess 2025-01-23 16:15:00 -04:00
parent 12660314f1
commit ea775baccd
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
22 changed files with 159 additions and 163 deletions

View file

@ -14,20 +14,19 @@ module Utility.OSX (
genOSXAutoStartFile,
) where
import Common
import Utility.UserInfo
import System.FilePath
autoStartBase :: String -> OsPath
autoStartBase label = literalOsPath "Library" </> literalOsPath "LaunchAgents" </> literalOsPath (label ++ ".plist")
autoStartBase :: String -> FilePath
autoStartBase label = "Library" </> "LaunchAgents" </> label ++ ".plist"
systemAutoStart :: String -> OsPath
systemAutoStart label = literalOsPath "/" </> autoStartBase label
systemAutoStart :: String -> FilePath
systemAutoStart label = "/" </> autoStartBase label
userAutoStart :: String -> IO FilePath
userAutoStart :: String -> IO OsPath
userAutoStart label = do
home <- myHomeDir
return $ home </> autoStartBase label
return $ toOsPath home </> autoStartBase label
{- Generates an OSX autostart plist file with a given label, command, and
- params to run at boot or login. -}