From 44bf67b7a2da75ef80e32d6409cc41a6ab8b6ffe Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 24 Dec 2016 15:14:05 -0400 Subject: GHC's fileSystemEncoding is used for all String IO, to avoid encoding-related crashes in eg, Propellor.Property.File. --- src/Propellor/CmdLine.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Propellor/CmdLine.hs') diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs index fc256109..c407fce8 100644 --- a/src/Propellor/CmdLine.hs +++ b/src/Propellor/CmdLine.hs @@ -19,6 +19,7 @@ import Propellor.Types.CmdLine import qualified Propellor.Property.Docker as Docker import qualified Propellor.Property.Chroot as Chroot import qualified Propellor.Shim as Shim +import Utility.FileSystemEncoding usage :: Handle -> IO () usage h = hPutStrLn h $ unlines @@ -94,6 +95,7 @@ data CanRebuild = CanRebuild | NoRebuild -- | Runs propellor on hosts, as controlled by command-line options. defaultMain :: [Host] -> IO () defaultMain hostlist = withConcurrentOutput $ do + useFileSystemEncoding Shim.cleanEnv checkDebugMode cmdline <- processCmdLine -- cgit v1.2.3