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

Disable console when update is running #333

Merged
merged 1 commit into from
Oct 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions cardano-launcher/src/Cardano/Shell/Update/Lib.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ import Distribution.System (OS (..), buildOS)
import Prelude (String)

import System.Directory (doesFileExist, removeFile)
import System.Process (proc, waitForProcess, withCreateProcess)
import System.Process (CreateProcess (..), StdStream (..), proc,
waitForProcess, withCreateProcess)

#ifdef mingw32_HOST_OS
import qualified Data.Text as T
Expand Down Expand Up @@ -79,8 +80,13 @@ osToUpdateOSPlatform _ = UnixOS

-- | The way we should run the process normally.
runDefaultUpdateProcess :: FilePath -> [String] -> IO ExitCode
runDefaultUpdateProcess path args =
withCreateProcess (proc path args)
runDefaultUpdateProcess path args = do
let process = (proc path args)
{ std_in = CreatePipe
, std_out = CreatePipe
, std_err = CreatePipe
}
withCreateProcess process
$ \_in _out _err ph -> waitForProcess ph

-- The function for executing the update.
Expand Down