aboutsummaryrefslogtreecommitdiff
path: root/Messages/Internal.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-02-14 15:02:42 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-02-14 15:02:42 -0400
commitb9c249d46e582bf52b771368cfe9d8d455c11f9f (patch)
treed80ac8add3a7c560a8ec8cb148d6e1ae2effbe9e /Messages/Internal.hs
parentcc13dd82c5cd7647f911ed6be1e58694f7edee31 (diff)
Work around problem with concurrent-output when in a non-unicode locale by avoiding use of it in such a locale.
Instead -J will behave as if it was built without concurrent-output support in this situation. Ie, it will be mostly quiet, except when there's an error. Note that it's not a problem for a filename to contain invalid utf-8 when in a utf-8 locale. That is handled ok by concurrent-output. It's only displaying unicode characters in a non-unicode locale that doesn't work.
Diffstat (limited to 'Messages/Internal.hs')
-rw-r--r--Messages/Internal.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Messages/Internal.hs b/Messages/Internal.hs
index fcbbe10b4..9b9edccc5 100644
--- a/Messages/Internal.hs
+++ b/Messages/Internal.hs
@@ -21,13 +21,13 @@ outputMessage json s = withOutputType go
go NormalOutput = liftIO $
flushed $ putStr s
go QuietOutput = q
- go (ConcurrentOutput _) = concurrentMessage False s q
+ go o@(ConcurrentOutput {}) = concurrentMessage o False s q
go JSONOutput = liftIO $ flushed json
outputError :: String -> Annex ()
outputError s = withOutputType go
where
- go (ConcurrentOutput _) = concurrentMessage True s (go NormalOutput)
+ go o@(ConcurrentOutput {}) = concurrentMessage o True s (go NormalOutput)
go _ = liftIO $ do
hFlush stdout
hPutStr stderr s