Add a precheck for git to build.psm1 (#13227)

This commit is contained in:
Christopher Yeleighton 2020-08-18 07:22:29 +02:00 committed by GitHub
parent f8b9e8e9db
commit 6c96f250e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -345,8 +345,14 @@ function Start-PSBuild {
# Add .NET CLI tools to PATH
Find-Dotnet
# Verify we have git in place to do the build, and abort if the precheck failed
$precheck = precheck 'git' "Build dependency 'git' not found in PATH. See <URL: https://docs.github.com/en/github/getting-started-with-github/set-up-git#setting-up-git >"
if (-not $precheck) {
return
}
# Verify we have .NET SDK in place to do the build, and abort if the precheck failed
$precheck = precheck 'dotnet' "Build dependency 'dotnet' not found in PATH. Run Start-PSBootstrap. Also see: https://dotnet.github.io/getting-started/"
$precheck = precheck 'dotnet' "Build dependency 'dotnet' not found in PATH. Run Start-PSBootstrap. Also see <URL: https://dotnet.github.io/getting-started/ >"
if (-not $precheck) {
return
}