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

Commit 874daab

Browse files
author
Hiroto Shioi
committed
Disable console when update is running
1 parent 1a8f9ec commit 874daab

File tree

1 file changed

+9
-3
lines changed
  • cardano-launcher/src/Cardano/Shell/Update

1 file changed

+9
-3
lines changed

cardano-launcher/src/Cardano/Shell/Update/Lib.hs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ import Distribution.System (OS (..), buildOS)
2929
import Prelude (String)
3030

3131
import System.Directory (doesFileExist, removeFile)
32-
import System.Process (proc, waitForProcess, withCreateProcess)
32+
import System.Process (CreateProcess (..), StdStream (..), proc,
33+
waitForProcess, withCreateProcess)
3334

3435
#ifdef mingw32_HOST_OS
3536
import qualified Data.Text as T
@@ -79,8 +80,13 @@ osToUpdateOSPlatform _ = UnixOS
7980

8081
-- | The way we should run the process normally.
8182
runDefaultUpdateProcess :: FilePath -> [String] -> IO ExitCode
82-
runDefaultUpdateProcess path args =
83-
withCreateProcess (proc path args)
83+
runDefaultUpdateProcess path args = do
84+
let process = (proc path args)
85+
{ std_in = CreatePipe
86+
, std_out = CreatePipe
87+
, std_err = CreatePipe
88+
}
89+
withCreateProcess process
8490
$ \_in _out _err ph -> waitForProcess ph
8591

8692
-- The function for executing the update.

0 commit comments

Comments
 (0)