scripts: home: Make sure profile directory exists.

* guix/scripts/home.scm (process-action): Make sure profile directory exists.
This commit is contained in:
Oleg Pykhalov 2021-10-09 14:52:10 +03:00
parent 0e8d2df0f1
commit 0f6a27c2c4
No known key found for this signature in database
GPG key ID: 167F8EA5001AFA9C
2 changed files with 4 additions and 1 deletions

View file

@ -2,6 +2,7 @@
;;; Copyright © 2021 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>
;;;
;;; This file is part of GNU Guix.
;;;
@ -189,6 +190,7 @@ 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))