me
/
guix
Archived
1
0
Fork 0

guix package: Don't error out when failing to create ~/.guix-profile.

This is a followup to 7842ddcbc1, which
broke tests when 'HOME' is unset.

* guix/scripts/package.scm (ensure-default-profile): Silently ignore
'symlink' exceptions.
master
Ludovic Courtès 2020-02-27 23:24:56 +01:00
parent 749b958206
commit 6b0653e7ec
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 5 additions and 2 deletions

View File

@ -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.