head file will end with a newline

This commit is contained in:
Joey Hess 2014-08-19 16:44:51 -04:00
parent 3c61c109fb
commit 4ae9578e36
1 changed files with 2 additions and 1 deletions

View File

@ -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 $