diff --git a/build/macos/1_build-deps-macports.sh b/build/macos/1_build-deps-macports.sh index 3657a91c42..21316bb1a6 100644 --- a/build/macos/1_build-deps-macports.sh +++ b/build/macos/1_build-deps-macports.sh @@ -14,6 +14,8 @@ elif [ $(basename "$PWD") = 'macos' ]; then cd ../../.. fi if [ -z "$GITLAB_CI" ]; then + which git >/dev/null 2>&1 || { printf '\033[31m(ERROR)\033[0m: git is required for this script. Please, read: https://developer.gimp.org/core/setup/git/#source-from-git\n'; exit 1; } + GIT_DEPTH='1' PARENT_DIR='/..' diff --git a/build/windows/1_build-deps-msys2.ps1 b/build/windows/1_build-deps-msys2.ps1 index 1ec2bee35c..3baa24899f 100644 --- a/build/windows/1_build-deps-msys2.ps1 +++ b/build/windows/1_build-deps-msys2.ps1 @@ -14,6 +14,8 @@ elseif (Test-Path 1_build-deps-msys2.ps1 -Type Leaf) } if (-not $GITLAB_CI) { + if (-not (Get-Command "git" -ErrorAction SilentlyContinue)) { Write-Host '(ERROR): git is required for this script. Please, read: https://developer.gimp.org/core/setup/git/#source-from-git' -ForegroundColor Red; exit 1 } + $GIT_DEPTH = '1' $PARENT_DIR = '\..'