if source is git, make /checkout dir safe for git
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
3e4a15ea06
commit
abae168e2f
@ -36,6 +36,11 @@ root_dir="`dirname $src_dir`"
|
|||||||
objdir=$root_dir/obj
|
objdir=$root_dir/obj
|
||||||
dist=$objdir/build/dist
|
dist=$objdir/build/dist
|
||||||
|
|
||||||
|
|
||||||
|
if [ -d "$root_dir/.git" ]; then
|
||||||
|
IS_GIT_SOURCE=1
|
||||||
|
fi
|
||||||
|
|
||||||
source "$ci_dir/shared.sh"
|
source "$ci_dir/shared.sh"
|
||||||
|
|
||||||
CACHE_DOMAIN="${CACHE_DOMAIN:-ci-caches.rust-lang.org}"
|
CACHE_DOMAIN="${CACHE_DOMAIN:-ci-caches.rust-lang.org}"
|
||||||
@ -249,9 +254,13 @@ if [ "$dev" = "1" ]
|
|||||||
then
|
then
|
||||||
# Interactive + TTY
|
# Interactive + TTY
|
||||||
args="$args -it"
|
args="$args -it"
|
||||||
command="/bin/bash"
|
if [ $IS_GIT_SOURCE -eq 1 ]; then
|
||||||
|
command=(/bin/bash -c 'git config --global --add safe.directory /checkout;bash')
|
||||||
|
else
|
||||||
|
command=(/bin/bash)
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
command="/checkout/src/ci/run.sh"
|
command=(/checkout/src/ci/run.sh)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$CI" != "" ]; then
|
if [ "$CI" != "" ]; then
|
||||||
@ -301,7 +310,7 @@ docker \
|
|||||||
--init \
|
--init \
|
||||||
--rm \
|
--rm \
|
||||||
rust-ci \
|
rust-ci \
|
||||||
$command
|
"${command[@]}"
|
||||||
|
|
||||||
cat $objdir/${SUMMARY_FILE} >> "${GITHUB_STEP_SUMMARY}"
|
cat $objdir/${SUMMARY_FILE} >> "${GITHUB_STEP_SUMMARY}"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user