summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-11-23 17:03:08 -0800
committerBen Sima <ben@bsima.me>2019-11-23 17:03:08 -0800
commit56a5538e8ca96dd963af8c84ddc9fa1342fdcde6 (patch)
treec9085828e7f00e1c2eda8c35bec7353fd84dfd99
parent294c8e19b136f06ca7fa1bb4e4d109e90e2bb033 (diff)
Print the nix log on bild failure
-rwxr-xr-xbild6
1 files changed, 6 insertions, 0 deletions
diff --git a/bild b/bild
index 36d8917..5466d52 100755
--- a/bild
+++ b/bild
@@ -1,2 +1,8 @@
#!/usr/bin/env bash
nix build -f default.nix "$@"
+if [[ $? != 0 ]]
+then
+ echo ":: bild fail"
+ echo ":: replaying the log..."
+ PAGER=cat nix log -f default.nix "$@"
+fi