Skip to content

Commit 6b7fbc1

Browse files
authored
Merge pull request #135 from pbhandari356/pbhandari-fix-git-error
fix: git error introduced in git 2.35.2
2 parents 63c3999 + 5690438 commit 6b7fbc1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

script.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/bin/sh
22

3-
cd "${GITHUB_WORKSPACE}/${INPUT_WORKDIR}" || exit 1
3+
if [ -n "${GITHUB_WORKSPACE}" ] ; then
4+
cd "${GITHUB_WORKSPACE}/${INPUT_WORKDIR}" || exit 1
5+
git config --global --add safe.directory "${GITHUB_WORKSPACE}" || exit 1
6+
fi
47

58
TEMP_PATH="$(mktemp -d)"
69
PATH="${TEMP_PATH}:$PATH"

0 commit comments

Comments
 (0)