packages feed

cachix 1.3.2 → 1.3.3

raw patch · 3 files changed

+27/−18 lines, 3 files

Files

CHANGELOG.md view
@@ -5,7 +5,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.3.3] - 2023-03-18++### Fixed++- Fix watch-exec exiting too soon.+ ## [1.3.2] - 2023-03-17++### Fixed  - Fix build on GHC 9.4 
cachix.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.2 name:               cachix-version:            1.3.2+version:            1.3.3 license:            Apache-2.0 license-file:       LICENSE copyright:          2018 Domen Kozar
src/Cachix/Client/Commands.hs view
@@ -202,25 +202,26 @@         hDuplicateTo stderr stdout -- redirect all stdout to stderr         WatchStore.startWorkers (pushParamsStore pushParams) (numJobs pushOpts) pushParams -  Async.withAsync watch $ \watchThread -> do-    -- Throw any errors encountered by the workers-    Async.link watchThread+  (_, exitCode) <-+    Async.concurrently watch $ do+      exitCode <-+        bracketOnError+          (getProcessHandle <$> System.Process.createProcess process)+          ( \processHandle -> do+              -- Terminate the process+              uninterruptibleMask_ (System.Process.terminateProcess processHandle)+              -- Wait for the process to clean up and exit+              _ <- System.Process.waitForProcess processHandle+              -- Stop watching the store and wait for all paths to be pushed+              Signals.raiseSignal Signals.sigINT+          )+          System.Process.waitForProcess -    exitCode <--      bracketOnError-        (getProcessHandle <$> System.Process.createProcess process)-        ( \processHandle -> do-            -- Terminate the process-            uninterruptibleMask_ (System.Process.terminateProcess processHandle)-            -- Wait for the process to clean up and exit-            _ <- System.Process.waitForProcess processHandle-            -- Stop watching the store and wait for all paths to be pushed-            Signals.raiseSignal Signals.sigINT-        )-        System.Process.waitForProcess+      -- Stop watching the store and wait for all paths to be pushed+      Signals.raiseSignal Signals.sigINT+      return exitCode -    Signals.raiseSignal Signals.sigINT-    exitWith exitCode+  exitWith exitCode   where     getProcessHandle (_, _, _, processHandle) = processHandle