summaryrefslogtreecommitdiff
path: root/src/TestMode.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2026-10-17 15:51:31 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2026-10-20 20:21:44 +0200
commite56577e4506c7db72aef9e273cfa00592ca20829 (patch)
tree56f20cef616bcff2223fd8db4cf1cb7df5157291 /src/TestMode.hs
parent5f892bc3cd212f362b0a8f29528b783b142da8e8 (diff)
Do not look for config file in parent dirs in test mode
Diffstat (limited to 'src/TestMode.hs')
-rw-r--r--src/TestMode.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/TestMode.hs b/src/TestMode.hs
index 22481f4..220aa0b 100644
--- a/src/TestMode.hs
+++ b/src/TestMode.hs
@@ -4,12 +4,12 @@ module TestMode (
testMode,
) where
+import Control.Monad
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.State
import Data.List
-import Data.Maybe
import Data.Text (Text)
import Data.Text qualified as T
import Data.Text.IO qualified as T
@@ -84,7 +84,7 @@ runTestsC tests = do
Just LoadedModules {..} <- gets tmsModules
mbconfig <- asks tmiConfig
let opts = defaultTestOptions
- { optDefaultTool = fromMaybe (ToolPath "/bin/true") $ configTool =<< mbconfig
+ { optDefaultTool = (configTool =<< mbconfig) `mplus` Just (ToolPath "/bin/true")
, optTestDir = ".test" <> show num
, optKeep = True
, optKeepGoing = True