summaryrefslogtreecommitdiff
path: root/guix/scripts/environment.scm
diff options
context:
space:
mode:
authorAndreas Enge <andreas@enge.fr>2023-03-20 18:21:47 +0100
committerAndreas Enge <andreas@enge.fr>2023-03-20 18:49:06 +0100
commitccb62d8feb50e2859d7c41429a9e3d9e0fe30bfe (patch)
tree4ab573cee33f277828ad553a22579175b1dda22d /guix/scripts/environment.scm
parent098bd280f82350073e8280e37d56a14162eed09c (diff)
parentf80215c7c4ae5ea0c316f4766e6c05ae4218ede3 (diff)
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'guix/scripts/environment.scm')
-rw-r--r--guix/scripts/environment.scm24
1 files changed, 16 insertions, 8 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 44cfcb4f76..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)
@@ -767,14 +772,17 @@ WHILE-LIST."
(append
(override-user-mappings
user home
- (append user-mappings
- ;; Share current working directory, unless asked not to.
- (if map-cwd?
- (list (file-system-mapping
- (source cwd)
- (target cwd)
- (writable? #t)))
- '())))
+ (append
+ ;; Share current working directory, unless asked not to.
+ (if map-cwd?
+ (list (file-system-mapping
+ (source cwd)
+ (target cwd)
+ (writable? #t)))
+ '())
+ ;; Add the user mappings *after* the current working directory
+ ;; so that a user can layer bind mounts on top of it.
+ user-mappings))
;; Mappings for the union closure of all inputs.
(map (lambda (dir)
(file-system-mapping