From 9e30788903190c4184075ea0bb653653119a1635 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Mon, 27 Dec 2021 19:30:02 +0530 Subject: [PATCH] Fail fast on composer setup failure --- src/scripts/common.sh | 1 + src/scripts/win32.ps1 | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/scripts/common.sh b/src/scripts/common.sh index 300f3eeb..73ecfde7 100644 --- a/src/scripts/common.sh +++ b/src/scripts/common.sh @@ -322,6 +322,7 @@ add_tool() { tool_version=$(get_tool_version "$tool" "$ver_param") add_log "$tick" "$tool" "Added $tool $tool_version" else + [ "$tool" = "composer" ] && fail_fast=true add_log "$cross" "$tool" "Could not setup $tool" fi } diff --git a/src/scripts/win32.ps1 b/src/scripts/win32.ps1 index 5f479d5e..7e53794a 100644 --- a/src/scripts/win32.ps1 +++ b/src/scripts/win32.ps1 @@ -402,6 +402,9 @@ Function Add-Tool() { $tool_version = Get-ToolVersion $tool $ver_param Add-Log $tick $tool "Added $tool $tool_version" } else { + if($tool -eq "composer") { + $env:fail_fast = 'true' + } Add-Log $cross $tool "Could not add $tool" } }