summaryrefslogtreecommitdiff
path: root/guix/scripts/environment.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-23 21:45:21 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-23 21:45:21 -0400
commit839bb4616f13171a23ad7937bf57d0a01d61d42a (patch)
tree01de78a5ce973b9fb7ac0f9216d64f736f8e163d /guix/scripts/environment.scm
parent0357bbbcd850f9220078a62da3c30358b8983765 (diff)
parentef71e3290916583973724316e815cee840c1b6d8 (diff)
Merge remote-tracking branch 'origin/master' into staging.
With resolved conflicts in: gnu/packages/ibus.scm gnu/packages/image.scm gnu/packages/lisp.scm gnu/packages/virtualization.scm
Diffstat (limited to 'guix/scripts/environment.scm')
-rw-r--r--guix/scripts/environment.scm28
1 files changed, 18 insertions, 10 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 46435ae48e..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)
@@ -664,8 +669,8 @@ command name."
(let ((closest (string-closest executable available
#:threshold 12)))
(unless (or (not closest) (string=? closest executable))
- (display-hint (format #f (G_ "Did you mean '~a'?~%")
- closest)))))))))
+ (display-hint (G_ "Did you mean '~a'?~%")
+ closest))))))))
(define* (launch-environment/fork command profile manifest
#:key pure? (white-list '()))
@@ -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