Skip to content

Commit 49ba767

Browse files
committed
git-artifacts: only populate /usr/bin/git when really necessary
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent bc0b46c commit 49ba767

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/git-artifacts.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,10 @@ jobs:
287287
set -x
288288
BUILD_SRC=$(test x86_64 != "$ARCHITECTURE" || echo "--build-src-pkg")
289289
# Make sure that there is a `/usr/bin/git` that can be used by `makepkg-mingw`
290-
printf '#!/bin/sh\n\nexec '$MINGW_PREFIX'/bin/git.exe "$@"\n' >/usr/bin/git &&
290+
if test ! -x /usr/bin/git
291+
then
292+
printf '#!/bin/sh\n\nexec '$MINGW_PREFIX'/bin/git.exe "$@"\n' >/usr/bin/git
293+
fi &&
291294
(
292295
cd /usr/src/MINGW-packages/mingw-w64-git/src/git &&
293296
/usr/src/build-extra/please.sh build-mingw-w64-git --reset-pkgrel --only-$ARCHITECTURE $BUILD_SRC \

0 commit comments

Comments
 (0)