Subject: [PATCH 1/1] environment: Unset 'TERM' when checking environment.

From: Winter <[email-masked]>
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