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
parent
749b958206
commit
6b0653e7ec
|
@ -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.
|
||||
|
|
Reference in New Issue