summary refs log tree commit diff
path: root/guix/scripts/package.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 1cb0d382bf..d2f4f1ccd3 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -81,12 +81,15 @@
   "Ensure the default profile symlink and directory exist and are writable."
   (ensure-profile-directory)
 
-  ;; Create ~/.guix-profile if it doesn't exist yet.
+  ;; Try to create ~/.guix-profile if it doesn't exist yet.
   (when (and %user-profile-directory
              %current-profile
              (not (false-if-exception
                    (lstat %user-profile-directory))))
-    (symlink %current-profile %user-profile-directory)))
+    (catch 'system-error
+      (lambda ()
+        (symlink %current-profile %user-profile-directory))
+      (const #t))))
 
 (define (delete-generations store profile generations)
   "Delete GENERATIONS from PROFILE.