guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: scripts: environment: Fix ordering issue with CWD


From: guix-commits
Subject: branch master updated: scripts: environment: Fix ordering issue with CWD and --expose.
Date: Mon, 06 Mar 2023 21:23:11 -0500

This is an automated email from the git hooks/post-receive script.

apteryx pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new aca64d5604 scripts: environment: Fix ordering issue with CWD and 
--expose.
aca64d5604 is described below

commit aca64d560452812208c654abba1ec3ab7041eefd
Author: Josselin Poiret <dev@jpoiret.xyz>
AuthorDate: Mon Feb 13 22:31:21 2023 +0100

    scripts: environment: Fix ordering issue with CWD and --expose.
    
    Fixes <https://issues.guix.gnu.org/46782>.
    
    * guix/scripts/environment.scm (launch-environment/container): Move the CWD
    mapping to the front of the file system mappings.
    
    Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
    Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
 guix/scripts/environment.scm | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 44cfcb4f76..33a76abff3 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -767,14 +767,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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]