From 01aff07c4c3649ff436b9557095d65c27d624b75 Mon Sep 17 00:00:00 2001 From: Cliff Brake Date: Tue, 24 Mar 2020 20:14:55 -0400 Subject: [PATCH] don't map gitconfig unless it exists --- envsetup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/envsetup.sh b/envsetup.sh index f2e56f011..748400b1c 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -489,6 +489,7 @@ dkr() { unset MAP_DL_DIR unset MAP_TMPDIR unset MAP_SSTATE_DIR + unset MAP_GITCONFIG MAP_TMPDIR="-v $(readlink -f $OE_BUILD_TMPDIR):$(readlink -f $OE_BUILD_TMPDIR)" MAP_DL_DIR="-v $(readlink -f $OE_DL_DIR):$(readlink -f $OE_DL_DIR)" MAP_SSTATE_DIR="-v $(readlink -f $OE_SSTATE_DIR):$(readlink -f $OE_SSTATE_DIR)" @@ -497,10 +498,14 @@ dkr() { SSH_AUTH_DIR=$(readlink -f $SSH_AUTH_SOCK) fi + if [ -e ~/.gitconfig ]; then + MAP_GITCONFIG="-v $HOME/.gitconfig:/home/build/.gitconfig" + fi + docker run --rm -i $PSEUDO_TTY \ -v ${OE_BASE}:${OE_BASE} \ -v ~/.ssh:/home/build/.ssh \ - -v ~/.gitconfig:/home/build/.gitconfig \ + $MAP_GITCONFIG \ $MAP_DL_DIR \ $MAP_SSTATE_DIR \ $MAP_TMPDIR \