projects
/
lsp-test.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3a38253
)
Handle env vars set to "0"
author
Luke Lau
<luke_lau@icloud.com>
Sun, 15 Dec 2019 19:52:08 +0000
(19:52 +0000)
committer
Luke Lau
<luke_lau@icloud.com>
Sun, 15 Dec 2019 19:52:08 +0000
(19:52 +0000)
src/Language/Haskell/LSP/Test.hs
patch
|
blob
|
history
diff --git
a/src/Language/Haskell/LSP/Test.hs
b/src/Language/Haskell/LSP/Test.hs
index 03e2a1a55e13f4c32996c2305acf8e328ea6f3ec..bca640f532c712ea051c28ad34f506bf3c501238 100644
(file)
--- a/
src/Language/Haskell/LSP/Test.hs
+++ b/
src/Language/Haskell/LSP/Test.hs
@@
-195,7
+195,9
@@
runSessionWithConfig config' serverExe caps rootDir session = do
logStdErr' <- fromMaybe (logStdErr cfg) <$> checkEnv "LSP_TEST_LOG_STDERR"
return $ cfg { logMessages = logMessages', logStdErr = logStdErr' }
where checkEnv :: String -> IO (Maybe Bool)
logStdErr' <- fromMaybe (logStdErr cfg) <$> checkEnv "LSP_TEST_LOG_STDERR"
return $ cfg { logMessages = logMessages', logStdErr = logStdErr' }
where checkEnv :: String -> IO (Maybe Bool)
- checkEnv s = fmap (const True) <$> lookupEnv s
+ checkEnv s = fmap convertVal <$> lookupEnv s
+ convertVal "0" = False
+ convertVal _ = True
-- | The current text contents of a document.
documentContents :: TextDocumentIdentifier -> Session T.Text
-- | The current text contents of a document.
documentContents :: TextDocumentIdentifier -> Session T.Text