diff --git a/modules/openapi-generator/src/main/resources/powershell/appveyor.mustache b/modules/openapi-generator/src/main/resources/powershell/appveyor.mustache index 0f70eb14ecf..b3ecb9cf594 100644 --- a/modules/openapi-generator/src/main/resources/powershell/appveyor.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/appveyor.mustache @@ -18,12 +18,10 @@ deploy_script: - ps: | if ($env:APPVEYOR_REPO_TAG -eq $true -and $env:NuGetApiKey -ne $null -and $env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") { .\Build.ps1 - choco install NuGet.CommandLine - Install-PackageProvider -Name NuGet -Force Publish-Module -NuGetApiKey $env:NuGetApiKey -Path .\src\{{{packageName}}}\ -Confirm:$False -Verbose if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) - exit $LastExitCode + exit } else { Write-Host "Published the PowerShell module." } diff --git a/samples/client/petstore/powershell/appveyor.yml b/samples/client/petstore/powershell/appveyor.yml index 1d3959705c8..8e6678129af 100644 --- a/samples/client/petstore/powershell/appveyor.yml +++ b/samples/client/petstore/powershell/appveyor.yml @@ -24,12 +24,10 @@ deploy_script: - ps: | if ($env:APPVEYOR_REPO_TAG -eq $true -and $env:NuGetApiKey -ne $null -and $env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") { .\Build.ps1 - choco install NuGet.CommandLine - Install-PackageProvider -Name NuGet -Force Publish-Module -NuGetApiKey $env:NuGetApiKey -Path .\src\PSPetstore\ -Confirm:$False -Verbose if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) - exit $LastExitCode + exit } else { Write-Host "Published the PowerShell module." }