aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/environment.scm
diff options
context:
space:
mode:
authorWinter <winter@winter.cafe>2023-03-02 21:27:10 -0500
committerLudovic Courtès <ludo@gnu.org>2023-03-13 15:08:33 +0100
commit3a7757f1fdc4ae30d7ce177792be437a7a5ca52f (patch)
tree7b5b6bc7edac56e51774c658e98a51d72ac60e93 /guix/scripts/environment.scm
parentae587c2ef041413bc709a555261db752068ea360 (diff)
downloadguix-3a7757f1fdc4ae30d7ce177792be437a7a5ca52f.tar
guix-3a7757f1fdc4ae30d7ce177792be437a7a5ca52f.tar.gz
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>
Diffstat (limited to 'guix/scripts/environment.scm')
-rw-r--r--guix/scripts/environment.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 33a76abff3..a4939ea63c 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -514,6 +514,11 @@ by running 'set' in the shell."
(catch #t
(lambda ()
(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)
(close-fdes controller)
(login-tty inferior)