GNU bug report logs - #61927
[PATCH 0/1] environment: Fix '--check' for shells that output ANSI escape codes based on 'TERM'.

Previous Next

Package: guix-patches;

Reported by: Winter <winter <at> winter.cafe>

Date: Fri, 3 Mar 2023 02:26:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 61927 <at> debbugs.gnu.org (full text, mbox):

From: Winter <winter <at> winter.cafe>
To: 61927 <at> debbugs.gnu.org
Cc: Winter <winter <at> winter.cafe>
Subject: [PATCH 1/1] environment: Unset 'TERM' when checking environment.
Date: Thu,  2 Mar 2023 21:27:10 -0500
* guix/scripts/environment.scm (child-shell-environment): Unset 'TERM'.
---
 guix/scripts/environment.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 44cfcb4f76..a3cc9e6b83 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -514,6 +514,8 @@ (define lines
        (catch #t
          (lambda ()
            (load-profile profile manifest #:pure? #t)
+           ; We don't want ANSI escape codes such as bracketed paste to mess up the output of the script.
+           (setenv "TERM" "")
            (setenv "GUIX_ENVIRONMENT" profile)
            (close-fdes controller)
            (login-tty inferior)
-- 
2.39.1





This bug report was last modified 2 years and 128 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.