From db777eef134ac3034a7970511ab96312d356c83e Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Wed, 9 Aug 2023 23:24:49 +0200 Subject: [PATCH] utils/docker-run: also mount current working directory Currently, using utils/docker-run expects that the current working directory is the working copy. This means that it is not possible to use docker-run with an out-of-tree build (one using O=). Add the current working directory to the list of mountpoints, and use that as working directory in the container. Signed-off-by: Yann E. MORIN Cc: Thomas Petazzoni --- utils/docker-run | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utils/docker-run b/utils/docker-run index 40027514c5..e64b4f10c0 100755 --- a/utils/docker-run +++ b/utils/docker-run @@ -17,10 +17,13 @@ declare -a docker_opts=( -i --rm --user "$(id -u):$(id -g)" - --workdir "${MAIN_DIR}" + --workdir "$(pwd)" ) -declare -a mountpoints=( "${MAIN_DIR}" ) +declare -a mountpoints=( + "${MAIN_DIR}" + "$(pwd)" +) # Empty GIT_DIR means that we are not in a workdir, *and* git is too old # to know about worktrees, so we're not in a worktree either. So it means