Fix mirror PowerShell script (try 5)
@@ -17,7 +17,6 @@ param (
)
Set-StrictMode -Version 'Latest'
-$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
# Verify the PAT environmental variable is set.
if ($null -eq $Env:AzDO_PAT -or "" -eq $Env:AzDO_PAT) {
@@ -34,10 +33,6 @@ git remote add azdo-mirror "https://nibanks:$Env:AzDO_PAT@mscodehub.visualstudio
git reset --hard origin/$Branch
# Push to the AzDO repo.
-$Result = (git push azdo-mirror $Branch)
-if (($Result -as [String]).Contains("To https://mscodehub.visualstudio.com/msquic/_git/msquic")) {
- Write-Host "Successfully mirrored latest changes to https://mscodehub.visualstudio.com/msquic/_git/msquic"
-} else {
- Write-Error "ERROR:`n$($Result)"
- exit
-}
+git push azdo-mirror $Branch
+
+Write-Host "Successfully mirrored latest changes"
