summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-12-22 20:31:21 +0100
committermakefu <github@syntax-fehler.de>2015-12-22 20:31:21 +0100
commit86f2aeac201570159fefb8b9c7f9476e533abaa4 (patch)
treeac6fdad62644ed60cf723f48a0b50419cb0e1af3 /Makefile
parent7143ab375b378dc7ce947a0fbaba5ae25c9afb3a (diff)
Makefile: fail if nix-instantiate fails
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index aefd171..5b898c5 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ ifeq ($(filter),json)
else
filter() { cat; }
endif
- nix-instantiate \
+ result=$$(nix-instantiate \
$${extraArgs-} \
--eval \
-A "$$get" \
@@ -45,8 +45,9 @@ endif
--argstr current-host-name "$$HOSTNAME" \
--argstr current-user-name "$$LOGNAME" \
$${system+--argstr system "$$system"} \
- $${target+--argstr target "$$target"} \
- | filter
+ $${target+--argstr target "$$target"})
+ echo "$$result" | filter
+
else
$(error unbound variable: system[s])
endif