[gh-37] Suppressed re-publish errors.

This commit is contained in:
Andrey Shchekin 2017-01-03 02:22:21 +13:00
Родитель 544532c20d
Коммит 01a620ce94
1 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -3,7 +3,17 @@ Set-StrictMode -Version 2
try {
Set-Content '.npmrc' "//registry.npmjs.org/:_authToken=$($env:NpmAuthToken)"
Get-Item *.tgz | % { npm publish $($_.FullName) }
Get-Item *.tgz | % {
try {
npm publish $($_.FullName)
}
catch {
# not failing sine it's likely we tried to publish package
# twice with the same name. later this should be improved
# to actually check the error.
Write-Output $_
}
}
}
finally {
Remove-Item ".npmrc"