[PATCH] home: services: zsh: Fix zshenv creation.

  • Done
  • quality assurance status badge
Details
2 participants
  • Brian Kubisiak
  • Ludovic Courtès
Owner
unassigned
Submitted by
Brian Kubisiak
Severity
normal

Debbugs page

Brian Kubisiak wrote 3 years ago
(address . guix-patches@gnu.org)
20220329013501.bpfihhyghky4jq2u@peregrine
Fixes a regression introduced by
4935501fd9f690d8990bb798237d51702b87fb3f that would skip generating
the user's ~/.config/zsh/.zshenv unless both of zshenv and
environment-variables are set in the configuration.

* gnu/home/services/shells.scm (zsh-get-configuration-files):
Generate ~/.config/zsh/.zshenv when only one of zshenv or
environment-variables is specified.
---
gnu/home/services/shells.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index 7b9769bcf3..b0147291fc 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -212,8 +212,8 @@ (define (zsh-file-by-field config field)
(define (zsh-get-configuration-files config)
`(("zprofile" ,(zsh-file-by-field config 'zprofile)) ;; Always non-empty
- ,@(if (and (zsh-field-not-empty? config 'zshenv)
- (zsh-field-not-empty? config 'environment-variables))
+ ,@(if (or (zsh-field-not-empty? config 'zshenv)
+ (zsh-field-not-empty? config 'environment-variables))
`(("zshenv" ,(zsh-file-by-field config 'zshenv))) '())
,@(if (zsh-field-not-empty? config 'zshrc)
`(("zshrc" ,(zsh-file-by-field config 'zshrc))) '())
--
2.34.0
Ludovic Courtès wrote 3 years ago
(name . Brian Kubisiak)(address . brian@kubisiak.com)(address . 54617-done@debbugs.gnu.org)
875ynqwize.fsf@gnu.org
Hi,

Brian Kubisiak <brian@kubisiak.com> skribis:

Toggle quote (9 lines)
> Fixes a regression introduced by
> 4935501fd9f690d8990bb798237d51702b87fb3f that would skip generating
> the user's ~/.config/zsh/.zshenv unless both of zshenv and
> environment-variables are set in the configuration.
>
> * gnu/home/services/shells.scm (zsh-get-configuration-files):
> Generate ~/.config/zsh/.zshenv when only one of zshenv or
> environment-variables is specified.

Good catch! Applied, thanks.

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 54617@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 54617
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help