Skip to content

Commit

Permalink
Remove dependency on extra in launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
HeinrichApfelmus committed Feb 27, 2025
1 parent 2d16070 commit 4ec8946
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion lib/launcher/cardano-wallet-launcher.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ library
, bytestring >= 0.10.6 && < 0.13
, contra-tracer >= 0.1 && < 0.3
, directory >= 1.3.8 && < 1.4
, extra
, filepath >= 1.4.300.1 && < 1.6
, fmt >= 0.6.3.0 && < 0.7
, http-conduit >= 2.3.9 && < 2.4
Expand Down
7 changes: 4 additions & 3 deletions lib/launcher/src/Cardano/Launcher/Mithril.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import Prelude

import qualified Data.ByteString as BS

import Control.Monad.Extra
( unlessM
import Control.Monad
( unless
)
import Network.HTTP.Simple
( getResponseBody
Expand Down Expand Up @@ -63,7 +63,8 @@ downloadMithril workingDir = withCurrentDirectory workingDir $ do
callProcess "tar" ["xf", mithrilTar]

let clientPath = workingDir </> ("mithril-client" <> if isWindows then ".exe" else "")
unlessM (doesFileExist clientPath) $
mithrilClientExists <- doesFileExist clientPath
unless mithrilClientExists $
fail $ unwords
[ "downloadLatest: didn't find"
, clientPath
Expand Down
5 changes: 1 addition & 4 deletions lib/launcher/src/Cardano/Startup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ import Control.Tracer
( Tracer
, traceWith
)
import Data.Either.Extra
( eitherToMaybe
)
import Data.Text.Class
( ToText (..)
)
Expand Down Expand Up @@ -104,7 +101,7 @@ withShutdownHandler' tr h action = do
enabled <- hIsOpen h
traceWith tr $ MsgShutdownHandler enabled
let with
| enabled = fmap eitherToMaybe . race readerLoop
| enabled = fmap (either (const Nothing) Just) . race readerLoop
| otherwise = fmap Just
with action
where
Expand Down

0 comments on commit 4ec8946

Please sign in to comment.