environment: Clear 'TERM' when checking environment.

* guix/scripts/environment.scm (child-shell-environment): Set 'TERM' to
the empty string.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Winter 2023-03-02 21:27:10 -05:00 committed by Ludovic Courtès
parent ae587c2ef0
commit 3a7757f1fd
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -514,6 +514,11 @@ (define lines
(catch #t (catch #t
(lambda () (lambda ()
(load-profile profile manifest #:pure? #t) (load-profile profile manifest #:pure? #t)
;; Mark the terminal as "unknown" do avoid ANSI escape codes such
;; as bracketed paste that would mess up the output of the script.
(setenv "TERM" "")
(setenv "GUIX_ENVIRONMENT" profile) (setenv "GUIX_ENVIRONMENT" profile)
(close-fdes controller) (close-fdes controller)
(login-tty inferior) (login-tty inferior)