From aca64d560452812208c654abba1ec3ab7041eefd Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Mon, 13 Feb 2023 22:31:21 +0100 Subject: [PATCH] scripts: environment: Fix ordering issue with CWD and --expose. Fixes . * guix/scripts/environment.scm (launch-environment/container): Move the CWD mapping to the front of the file system mappings. Signed-off-by: Maxim Cournoyer Modified-by: Maxim Cournoyer --- 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 @@ (define fhs-mappings (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