chore: use better exit code for "migration needed"

This commit is contained in:
Gregor Kleen 2020-10-14 13:04:47 +02:00
parent 7529933ebe
commit 286407252a

View File

@ -234,7 +234,7 @@ makeFoundation appSettings'@AppSettings{..} = do
migrateAll `runSqlPool` sqlPool
| otherwise -> whenM (requiresMigration `runSqlPool` sqlPool) $ do
$logErrorS "setup" "Migration required"
liftIO . exitWith $ ExitFailure 2
liftIO . exitWith $ ExitFailure 130
$logDebugS "setup" "Cluster-Config"
appCryptoIDKey <- clusterSetting (Proxy :: Proxy 'ClusterCryptoIDKey) `runSqlPool` sqlPool