Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't map gitconfig unless it exists #301

Merged
merged 1 commit into from
Mar 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand All @@ -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 \
Expand Down