Promote file not found warning message to an error.
This commit is contained in:
parent
79deba1f51
commit
9ed63d1545
5 changed files with 7 additions and 20 deletions
14
Messages.hs
14
Messages.hs
|
@ -25,7 +25,6 @@ module Messages (
|
|||
showErr,
|
||||
warning,
|
||||
warningIO,
|
||||
fileNotFound,
|
||||
indent,
|
||||
maybeShowJSON,
|
||||
showFullJSON,
|
||||
|
@ -45,7 +44,6 @@ import System.Log.Logger
|
|||
import System.Log.Formatter
|
||||
import System.Log.Handler (setFormatter, LogHandler)
|
||||
import System.Log.Handler.Simple
|
||||
import qualified Data.Set as S
|
||||
|
||||
import Common hiding (handle)
|
||||
import Types
|
||||
|
@ -172,18 +170,6 @@ warningIO w = do
|
|||
hFlush stdout
|
||||
hPutStrLn stderr w
|
||||
|
||||
{- Displays a warning one time about a file the user specified not existing. -}
|
||||
fileNotFound :: FilePath -> Annex ()
|
||||
fileNotFound file = do
|
||||
st <- Annex.getState Annex.output
|
||||
let shown = fileNotFoundShown st
|
||||
when (S.notMember file shown) $ do
|
||||
let shown' = S.insert file shown
|
||||
let st' = st { fileNotFoundShown = shown' }
|
||||
Annex.changeState $ \s -> s { Annex.output = st' }
|
||||
liftIO $ hPutStrLn stderr $ unwords
|
||||
[ "git-annex:", file, "not found" ]
|
||||
|
||||
indent :: String -> String
|
||||
indent = intercalate "\n" . map (\l -> " " ++ l) . lines
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue