Oleg Pykhalov writes: > * guix/scripts/home.scm (process-action): Make sure profile directory exists. > * tests/guix-home.sh: New file. > * Makefile.am (SH_TESTS): Add this. > --- > Makefile.am | 1 + > guix/scripts/home.scm | 2 ++ > tests/guix-home.sh | 73 +++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 76 insertions(+) > create mode 100644 tests/guix-home.sh > > diff --git a/Makefile.am b/Makefile.am > index b66789fa0b..5bf2567dc8 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -546,6 +546,7 @@ SH_TESTS = \ > tests/guix-package-aliases.sh \ > tests/guix-package-net.sh \ > tests/guix-system.sh \ > + tests/guix-home.sh \ > tests/guix-archive.sh \ > tests/guix-authenticate.sh \ > tests/guix-environment.sh \ > diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm > index 75df6d707d..115dfadb57 100644 > --- a/guix/scripts/home.scm > +++ b/guix/scripts/home.scm > @@ -1,6 +1,7 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright © 2021 Andrew Tropin > ;;; Copyright © 2021 Xinglu Chen > +;;; Copyright © 2021 Oleg Pykhalov > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -179,6 +180,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)) > diff --git a/tests/guix-home.sh b/tests/guix-home.sh > new file mode 100644 > index 0000000000..e79982b7f7 > --- /dev/null > +++ b/tests/guix-home.sh > @@ -0,0 +1,73 @@ > +#!/bin/sh > + > +# GNU Guix --- Functional package management for GNU > +# Copyright © 2021 Oleg Pykhalov > +# […] Well, guix home reconfigure will break your ~/.bashrc. Sorry. Don't use this "test".