From cdf763b8b8deeb9c7e572afe268869e441ef30aa Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 4 Dec 2014 17:11:08 -0400 Subject: [PATCH] propellor spin --- src/Propellor/Property/Chroot/Util.hs | 7 ++++--- src/Propellor/Property/OS.hs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Propellor/Property/Chroot/Util.hs b/src/Propellor/Property/Chroot/Util.hs index feb71d0..382fbab 100644 --- a/src/Propellor/Property/Chroot/Util.hs +++ b/src/Propellor/Property/Chroot/Util.hs @@ -9,7 +9,8 @@ import Control.Applicative standardPathEnv :: IO [(String, String)] standardPathEnv = do path <- getEnvDefault "PATH" "/bin" - addEntry "PATH" (path ++ std) + addEntry "PATH" (path ++ stdPATH) <$> getEnvironment - where - std = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + +stdPATH :: String +stdPATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" diff --git a/src/Propellor/Property/OS.hs b/src/Propellor/Property/OS.hs index 14e5d85..cbdb4d9 100644 --- a/src/Propellor/Property/OS.hs +++ b/src/Propellor/Property/OS.hs @@ -94,7 +94,7 @@ cleanInstallOnce confirmation = check (not <$> doesFileExist flagfile) $ let dest = "/" ++ takeFileName d whenM (not <$> fileExist dest) $ rename d dest - removeDirectory newOSDir + removeDirectoryRecursive newOSDir return MadeChange trickydirs =