summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
author宋文武 <iyzsong@member.fsf.org>2021-02-12 20:48:20 +0800
committer宋文武 <iyzsong@member.fsf.org>2021-02-12 20:54:33 +0800
commit5207c5eb55282464a4732fe8b7df40b406ef38a3 (patch)
tree3df59b480c4ea6af204f299d9f8687224fb1a957 /guix/scripts
parent512c6ea6e9f23492a7d0ec2afb8e2150ad9ff67d (diff)
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'.
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/pull.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 4e0ab5d341..13d5eceada 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -39,7 +39,7 @@
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 @@ true, display what would be built without actually building it."
(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~%")