From 6c96f250e60de5908d6778775677a7f09ddf2295 Mon Sep 17 00:00:00 2001 From: Christopher Yeleighton Date: Tue, 18 Aug 2020 07:22:29 +0200 Subject: [PATCH] Add a precheck for git to build.psm1 (#13227) --- build.psm1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 }