diff options
Diffstat (limited to 'guix/scripts/environment.scm')
-rw-r--r-- | guix/scripts/environment.scm | 24 |
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 |