From 4ae9578e3644cb3a11c105281b043721400f74cb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 19 Aug 2014 16:44:51 -0400 Subject: head file will end with a newline --- src/wrapper.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/wrapper.hs b/src/wrapper.hs index 3c5c15d1..6912e204 100644 --- a/src/wrapper.hs +++ b/src/wrapper.hs @@ -22,6 +22,7 @@ import Utility.Exception import Control.Monad import Control.Monad.IfElse +import Control.Applicative import System.Directory import System.FilePath import System.Environment (getArgs) @@ -73,7 +74,7 @@ wrapper args propellordir propellorbin = do ) checkRepo = whenM (doesFileExist disthead) $ do - headrev <- readFile disthead + headrev <- takeWhile (/= '\n') <$> readFile disthead changeWorkingDirectory propellordir headknown <- catchMaybeIO $ withQuietOutput createProcessSuccess $ -- cgit v1.2.3