pull: Create the "${XDG_CONFIG_HOME}/guix" directory when needed.

This fixes <https://bugs.gnu.org/46269>.

* guix/scripts/pull.scm (ensure-default-profile): Add a 'mkdir-p' call before
'symlink'.
This commit is contained in:
宋文武 2021-02-12 20:48:20 +08:00
parent 512c6ea6e9
commit 5207c5eb55
No known key found for this signature in database
GPG key ID: D415BF253B515976

View file

@ -39,7 +39,7 @@ (define-module (guix scripts pull)
close-inferior)
#:use-module (guix scripts build)
#:use-module (guix scripts describe)
#:autoload (guix build utils) (which)
#:autoload (guix build utils) (which mkdir-p)
#:use-module ((guix build syscalls)
#:select (with-file-lock/no-wait))
#:use-module (guix git)
@ -521,6 +521,7 @@ (define (ensure-default-profile)
(catch 'system-error
(lambda ()
(false-if-exception (delete-file link))
(mkdir-p (dirname link))
(symlink %current-profile link))
(lambda args
(leave (G_ "while creating symlink '~a': ~a~%")