From patchwork Tue Mar 29 01:35:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Kubisiak X-Patchwork-Id: 38167 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5974C27BBEA; Tue, 29 Mar 2022 02:36:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2152927BBE9 for ; Tue, 29 Mar 2022 02:36:11 +0100 (BST) Received: from localhost ([::1]:39312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZ0mI-0001mv-9V for patchwork@mira.cbaines.net; Mon, 28 Mar 2022 21:36:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZ0mA-0001mf-Qj for guix-patches@gnu.org; Mon, 28 Mar 2022 21:36:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZ0mA-0007Wi-Hs for guix-patches@gnu.org; Mon, 28 Mar 2022 21:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nZ0mA-0003Ok-Ew for guix-patches@gnu.org; Mon, 28 Mar 2022 21:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54617] [PATCH] home: services: zsh: Fix zshenv creation. Resent-From: Brian Kubisiak Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Mar 2022 01:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54617 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54617@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164851771913004 (code B ref -1); Tue, 29 Mar 2022 01:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Mar 2022 01:35:19 +0000 Received: from localhost ([127.0.0.1]:59463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZ0lS-0003Ng-PN for submit@debbugs.gnu.org; Mon, 28 Mar 2022 21:35:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:37174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZ0lR-0003NZ-Fe for submit@debbugs.gnu.org; Mon, 28 Mar 2022 21:35:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZ0lR-0001kQ-59 for guix-patches@gnu.org; Mon, 28 Mar 2022 21:35:17 -0400 Received: from mn-69-69-108-139.sta.embarqhsd.net ([69.69.108.139]:1516 helo=mail.kubisiak.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZ0lN-0007ES-Jh for guix-patches@gnu.org; Mon, 28 Mar 2022 21:35:16 -0400 Received: from peregrine (108-237-41-25.lightspeed.sntcca.sbcglobal.net [108.237.41.25]) by mail.kubisiak.com with ESMTPSA (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256) ; Mon, 28 Mar 2022 20:35:05 -0500 Date: Mon, 28 Mar 2022 18:35:01 -0700 From: Brian Kubisiak Message-ID: <20220329013501.bpfihhyghky4jq2u@peregrine> MIME-Version: 1.0 Content-Disposition: inline Received-SPF: pass client-ip=69.69.108.139; envelope-from=brian@kubisiak.com; helo=mail.kubisiak.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, PDS_RDNS_DYNAMIC_FP=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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(-) 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))) '())