diff --git a/scripts/guix.in b/scripts/guix.in
index 1315789a9c95c5e2477451ff7c4a301076f97bc7..4015560cd58ae36ab07aca44e1da8cf20f9ea002 100644
--- a/scripts/guix.in
+++ b/scripts/guix.in
@@ -51,7 +51,7 @@
                                     (and=> (getenv "HOME")
                                            (cut string-append <> "/.config")))
                                 (cut string-append <> "/guix/latest"))))
-        (when (file-exists? updates-dir)
+        (when (and updates-dir (file-exists? updates-dir))
           (push! updates-dir %load-path)
           (push! updates-dir %load-compiled-path)))))