summary refs log tree commit diff
path: root/guix/scripts
diff options
context:
space:
mode:
authorAndrew Tropin <andrew@trop.in>2023-02-24 16:04:33 +0400
committerAndrew Tropin <andrew@trop.in>2023-02-24 16:50:23 +0400
commite615aaca28fd6b797e9b41a71096ebe878c89299 (patch)
tree8d2924e6683fd68ba2dcd102d6f0aac081224e22 /guix/scripts
parente36ac715518387686bd8165e1724ce54984ee0ee (diff)
downloadguix-e615aaca28fd6b797e9b41a71096ebe878c89299.tar.gz
scripts: home: Move ensure-profile-directory to a better place.
The profile directory is usually created by daemon, when user opens a
connection.  Ideally, we would like to remove ensure-profile-directory call at
all, but daemon doesn't handle case with custom $GUIX_STATE_DIRECTORY yet.
More information in: <https://issues.guix.gnu.org/61717>

* guix/scripts/home.scm (process-action): Move ensure-profile-directory call
to the place, where connection to the daemon is already open.

Reported-by: wolf <wolf@wolfsden.cz>
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/home.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm
index 1d8aae727e..d86094bc43 100644
--- a/guix/scripts/home.scm
+++ b/guix/scripts/home.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
+;;; Copyright © 2021, 2023 Andrew Tropin <andrew@trop.in>
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com>
@@ -409,6 +409,7 @@ immediately.  Return the exit status of the process in the container."
                          network?)
   "Perform ACTION for home environment. "
 
+  (ensure-profile-directory)
   (define println
     (cut format #t "~a~%" <>))
 
@@ -473,7 +474,6 @@ ACTION must be one of the sub-commands that takes a home environment
 declaration as an argument (a file name.)  OPTS is the raw alist of options
 resulting from command-line parsing."
   (define (ensure-home-environment file-or-exp obj)
-    (ensure-profile-directory)
     (unless (home-environment? obj)
       (leave (G_ "'~a' does not return a home environment~%")
              file-or-exp))