summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/pre-inst-env.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/build-aux/pre-inst-env.in b/build-aux/pre-inst-env.in
index cd90a06cbc7..c18d3723354 100644
--- a/build-aux/pre-inst-env.in
+++ b/build-aux/pre-inst-env.in
@@ -46,6 +46,12 @@ export PATH
GUIX="$abs_top_builddir/scripts/guix"
export GUIX
+# Sanity check.
+if [ "$1" = "guix" ] && [ ! -f "$GUIX" ]; then
+ echo "$GUIX is not built. Please run 'make scripts/guix'."
+ exit 1
+fi
+
# Define $GUIX_UNINSTALLED to prevent `guix' from
# prepending @guilemoduledir@ to the Guile load paths.