Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit 5c1692a

Browse files
authored
Merge branch 'master' into ksaric/GH-313
2 parents 6ae6e17 + cd154b0 commit 5c1692a

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

cardano-launcher/app/Main.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ module Main where
66
import Cardano.Prelude
77
import qualified Prelude
88

9+
import Distribution.System (OS (Windows), buildOS)
910
import System.Environment (setEnv)
1011
import System.Exit (exitWith)
12+
import System.IO.Silently (hSilence)
1113

1214
import Formatting (bprint, build, formatToString)
1315
import Formatting.Buildable (Buildable (..))
@@ -37,7 +39,7 @@ import Data.Text.Lazy.Builder (fromString, fromText)
3739

3840
-- | Main function.
3941
main :: IO ()
40-
main = do
42+
main = silence $ do
4143

4244
logConfig <- defaultConfigStdout
4345

@@ -150,3 +152,7 @@ instance Show LauncherExceptions where
150152

151153
instance Exception LauncherExceptions
152154

155+
silence :: IO a -> IO a
156+
silence action = case buildOS of
157+
Windows -> hSilence [stdout, stderr] action
158+
_ -> action

cardano-launcher/cardano-launcher.cabal

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ executable cardano-launcher
8282
-- exception handling
8383
, safe-exceptions
8484
, text
85+
, silently
86+
, Cabal
87+
88+
if os(windows)
89+
ghc-options: -optl-mwindows
8590

8691
default-language: Haskell2010
8792
default-extensions: NoImplicitPrelude

nix/.stack.nix/cardano-launcher.nix

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/.stack.nix/default.nix

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stack.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ extra-deps:
88
- quickcheck-state-machine-0.6.0 # Used a specific dependency, new release.
99
- pretty-show-1.9.5 # Used for quickcheck-state-machine.
1010
- time-units-1.0.0
11+
- silently-1.2.5.1
1112

1213
- git: https://github.com/input-output-hk/cardano-prelude
1314
commit: 12ab51e27539c9cce042ded0c89efc0ccae6137a

0 commit comments

Comments
 (0)