Skip to content

Commit

Permalink
daemon: simplify exit codes
Browse files Browse the repository at this point in the history
Map push failure to exit code 3. The rest are 1.
  • Loading branch information
sandydoo committed Jun 20, 2024
1 parent 43891a7 commit 08976ca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cachix/src/Cachix/Client/Daemon/Types/Error.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ class HasExitCode a where

instance HasExitCode DaemonError where
toExitCode err = ExitFailure $ case err of
DaemonUnhandledException _ -> 1
DaemonEventLoopError _ -> 3
DaemonSocketError -> 4
DaemonPushFailure -> 5
DaemonPushFailure -> 3
_remainingErrors -> 1

instance (HasExitCode a) => HasExitCode (Maybe a) where
toExitCode Nothing = ExitSuccess
Expand Down

0 comments on commit 08976ca

Please sign in to comment.