fdac66ae10a7022326d1470862c93fd191216e61 lost the "git-annex:" prefix,
which broke datalad's parsing of an error message (ugh)
Also, don't use warningIO because it displays a blank line to stdout,
which is also a behavior change from before, and does not seem
necessary.
Sponsored-by: Brock Spratlen on Patreon
import qualified Data.ByteString.Char8 as S8
import System.Exit
import qualified Control.Monad.Catch as M
+import Data.String
import Common
import Types
endResult True = "ok"
endResult False = "failed"
-toplevelMsg :: StringContainingQuotedPath -> StringContainingQuotedPath
-toplevelMsg = ("git-annex: " <>)
+toplevelMsg :: (Semigroup t, IsString t) => t -> t
+toplevelMsg s = fromString "git-annex: " <> s
toplevelFileProblem :: Bool -> MessageId -> StringContainingQuotedPath -> String -> RawFilePath -> Maybe Key -> SeekInput -> Annex ()
toplevelFileProblem makeway messageid msg action file mkey si = do
((M.Handler (\ (e :: ExitCode) -> throwM e)) : nonAsyncHandler go)
where
go e = do
- warningIO (show e)
+ hPutStrLn stderr $ safeOutput $ toplevelMsg (show e)
exitWith $ ExitFailure 1