diff --git a/build.psm1 b/build.psm1 index dda6cc723d..9e28edfe32 100644 --- a/build.psm1 +++ b/build.psm1 @@ -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 " + 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 " if (-not $precheck) { return }