From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wCtPEGGs6mP2kgAAbAwnHQ (envelope-from ) for ; Mon, 13 Feb 2023 22:32:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ALVnEGGs6mMIbAEA9RJhRA (envelope-from ) for ; Mon, 13 Feb 2023 22:32:17 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1DEE1102B4 for ; Mon, 13 Feb 2023 22:32:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRgQh-00071I-AF; Mon, 13 Feb 2023 16:32:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRgQg-0006wo-7r for bug-guix@gnu.org; Mon, 13 Feb 2023 16:32:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRgQf-0005so-Uo for bug-guix@gnu.org; Mon, 13 Feb 2023 16:32:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRgQf-0000C5-9s for bug-guix@gnu.org; Mon, 13 Feb 2023 16:32:05 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#46782: [PATCH] scripts: environment: Mount cwd before user specified --expose. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 13 Feb 2023 21:32:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46782 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Josselin Poiret , bokr@bokr.com, Maxim Cournoyer Cc: 46782@debbugs.gnu.org, bbb ee , Simon Tournier Received: via spool by 46782-submit@debbugs.gnu.org id=B46782.1676323895693 (code B ref 46782); Mon, 13 Feb 2023 21:32:05 +0000 Received: (at 46782) by debbugs.gnu.org; 13 Feb 2023 21:31:35 +0000 Received: from localhost ([127.0.0.1]:51840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRgQ8-0000B3-FO for submit@debbugs.gnu.org; Mon, 13 Feb 2023 16:31:34 -0500 Received: from jpoiret.xyz ([206.189.101.64]:42042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRgQ3-0000Ar-6W for 46782@debbugs.gnu.org; Mon, 13 Feb 2023 16:31:29 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id B735B184BF2; Mon, 13 Feb 2023 21:31:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1676323885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i///93gWXqNxQQilLtXtPg+GgzP2Cz78f8qKsgwPCqc=; b=Z8bqNAsE4Yfqtt5+4uSfnBh47cTdYJwiBxxj37O/c/bc/uMvZ9FMWqs2PJZVLL4B1uwog3 tcG30a6y/5+7dDIBVe4vzZ+JtsbBafJoK9WYEXgLXfreO2NbKsuzKTBLSaUhad/FpcKJ7/ QJamLTEaZcupf+f70GdL7Tn9jD7gjvJgkT9sKq4o3HaD4ZyRz6Pi/GGed3QDQYRpuYjmcM 5Szr2+169YK4kowrGjMrDbEM6SzRDbIBAbKaNpqGzvNx9yZqK6UELHIIx5ianAWMrlG8Ao QKxTj7sMHKgYlMiTfD25KADtCw9DOUT/JyF03F7V9r7iKAcHd1wgU3LzpYukYg== Date: Mon, 13 Feb 2023 22:31:21 +0100 Message-Id: In-Reply-To: <875yc5clka.fsf@jpoiret.xyz> References: <875yc5clka.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: ++ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret From: Josselin Poiret via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676323937; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=i///93gWXqNxQQilLtXtPg+GgzP2Cz78f8qKsgwPCqc=; b=lkCetquitJQFHhqXHsZ57a8gO58uXY/dql9rK6OK0OVGAk3vAZqzOR4ma05Xk5qpxOFwVH hmQt+PiX2XEG5hwnm1/w4idxFu8BhzexknOyfAuK7AxTYq2gTIU8VfK3cGuzkqtyVC6fJj UQqXpDowCwZKQJukaBDkBwr6ouFRML33sO7m3Y4Rt9Fm6sIXsO1kKffe/cahni49FRLX1i WpxXGxiHk7bMSN0cZqWYVY0BFjF9JGVGMkoFRRcFPWFJrk9aIBXZjxR8HU48Jh3WOFxg33 2FGC+YDBnjrs3YSunIkNLdZ6RxP8WgOrOt7fQoqLeYs71QzwaYHDF8Im3aoVIw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=Z8bqNAsE; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676323937; a=rsa-sha256; cv=none; b=SxZchE5MCztfTMCDHHvwMQai6q+F7HdBRxqIUWix6dq+hhaItpxa440e9SM7+xaxHAHrij S7SNKmLWl2tyi+zZ0rDdknQ7Bufhzx5954XC9hJz/Kg7Quh4vSc+AxYLHk4U9FTDiQWlf5 sJNcnvwmXCV2oxszUaPFLazK4XiIC4RFdWOHkKyMxC0hNo56MXpkNyFz8y0PzCmW12ts6Y 1Z8M0Y+S/0GoLGMtEk68c2ORzd1iZ+F4Ex3rdndcifIprc0Yz0zkufImIz0tfNHywTHh8K AL1jPAbAiwZxYidyUt4sJW/+PEllRpGvdtZk+9A9IA1g46I9bOvAuWftB3oREQ== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=Z8bqNAsE; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -0.62 X-Spam-Score: -0.62 X-Migadu-Queue-Id: 1DEE1102B4 X-TUID: 2Tic/+iyzS5k * guix/scripts/environment.scm (launch-environment/container): Put cwd mapping at front of the file system mappings. Fixes: #46782 --- guix/scripts/environment.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 46435ae48e..8a1fc3c0ee 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -767,14 +767,14 @@ (define fhs-mappings (append (override-user-mappings user home - (append user-mappings - ;; Share current working directory, unless asked not to. + (append ;; Share current working directory, unless asked not to. (if map-cwd? (list (file-system-mapping (source cwd) (target cwd) (writable? #t))) - '()))) + '()) + user-mappings)) ;; Mappings for the union closure of all inputs. (map (lambda (dir) (file-system-mapping base-commit: dd724cfad45d76b9dcc5b073876c995715c92a07 -- 2.39.1