mirror of
https://github.com/ryantm/nixpkgs-update.git
synced 2024-12-15 22:01:58 +03:00
fix crash when missing derivation file
The derivation file existed on master, but did not exist on staging.
This commit is contained in:
parent
f652d735ef
commit
3bc08739f0
@ -14,6 +14,7 @@ module OurPrelude
|
||||
, Text
|
||||
, Vector
|
||||
, interpolate
|
||||
, tshow
|
||||
) where
|
||||
|
||||
import Control.Applicative ((<|>))
|
||||
@ -26,10 +27,13 @@ import Data.Bifunctor
|
||||
import Data.Function ((&))
|
||||
import Data.Semigroup ((<>))
|
||||
import Data.Set (Set)
|
||||
import Data.Text (Text)
|
||||
import Data.Text (Text, pack)
|
||||
import Data.Vector (Vector)
|
||||
import Language.Haskell.TH.Quote
|
||||
import qualified NeatInterpolation
|
||||
|
||||
interpolate :: QuasiQuoter
|
||||
interpolate = NeatInterpolation.text
|
||||
|
||||
tshow :: Show a => a -> Text
|
||||
tshow = show >>> pack
|
||||
|
@ -169,8 +169,7 @@ armRebuilds = archRebuilds "aarch64-linux"
|
||||
|
||||
outpathReport :: Set ResultLine -> Text
|
||||
outpathReport diff =
|
||||
let tshow = show >>> T.pack
|
||||
pkg = tshow $ V.length $ packageRebuilds diff
|
||||
let pkg = tshow $ V.length $ packageRebuilds diff
|
||||
firstFifty = T.unlines $ V.toList $ V.take 50 $ packageRebuilds diff
|
||||
darwin = tshow $ darwinRebuilds diff
|
||||
linux = tshow $ linuxRebuilds diff
|
||||
|
@ -335,5 +335,5 @@ assertNotUpdatedOn ::
|
||||
MonadIO m => UpdateEnv -> FilePath -> Text -> ExceptT Text m ()
|
||||
assertNotUpdatedOn updateEnv derivationFile branch = do
|
||||
Git.cleanAndResetTo branch
|
||||
derivationContents <- liftIO $ T.readFile derivationFile
|
||||
derivationContents <- fmapLT tshow $ tryIO $ T.readFile derivationFile
|
||||
Nix.assertOldVersionOn updateEnv branch derivationContents
|
||||
|
Loading…
Reference in New Issue
Block a user