Fail fast on composer setup failure

This commit is contained in:
Shivam Mathur 2021-12-27 19:30:02 +05:30
parent bca2d0b1b0
commit 9e30788903
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
2 changed files with 4 additions and 0 deletions

View File

@ -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
}

View File

@ -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"
}
}