Skip to content

Commit

Permalink
(#27) add try finally around directory changes
Browse files Browse the repository at this point in the history
Co-Authored-By: James Ruskin <github@justpowerdown.com>
  • Loading branch information
TheCakeIsNaOH and JPRuskin committed Jul 18, 2024
1 parent 2d1cfd1 commit 5637f66
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,14 @@ build_script:
Write-Host ("{0}`n{1}`n" -f ('-'*60), "PACKAGE: $package")
$package_dir = ls -recurse | ? { $_.Name -eq "$package.nuspec"} | select -First 1 | % Directory
if (!$package_dir) { Write-Warning "Can't find package '$package'"; continue }
pushd $package_dir
try {
pushd $package_dir
if (Test-Path update.ps1 -ea 0) { ./update.ps1 }
choco pack; Push-Package;
popd
choco pack
Push-Package
} finally {
popd
}
}
return
}
Expand Down

0 comments on commit 5637f66

Please sign in to comment.