From b6e0b65983098951caf249b7a96ff6c6c7cf2bc0 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 8 Apr 2020 17:26:07 +0800 Subject: [PATCH] stop error globally --- .../powershell-experimental/Org.OpenAPITools.psm1.mustache | 3 +++ .../powershell-experimental/src/PSPetstore/PSPetstore.psd1 | 2 +- .../powershell-experimental/src/PSPetstore/PSPetstore.psm1 | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/powershell-experimental/Org.OpenAPITools.psm1.mustache b/modules/openapi-generator/src/main/resources/powershell-experimental/Org.OpenAPITools.psm1.mustache index 25446dd2c197..ce575233bb86 100644 --- a/modules/openapi-generator/src/main/resources/powershell-experimental/Org.OpenAPITools.psm1.mustache +++ b/modules/openapi-generator/src/main/resources/powershell-experimental/Org.OpenAPITools.psm1.mustache @@ -1,6 +1,9 @@ {{>partial_header}} #region Import functions +# set $ErrorActionPreference to 'Stop' globally +$ErrorActionPreference = 'Stop' + # store the API client's configuration $Script:Configuration = [System.Collections.HashTable]@{} diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/PSPetstore.psd1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/PSPetstore.psd1 index 6d2601e7ed26..ba8f3680cbdd 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/PSPetstore.psd1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/PSPetstore.psd1 @@ -3,7 +3,7 @@ # # Generated by: OpenAPI Generator Team # -# Generated on: 4/6/20 +# Generated on: 4/8/20 # @{ diff --git a/samples/client/petstore/powershell-experimental/src/PSPetstore/PSPetstore.psm1 b/samples/client/petstore/powershell-experimental/src/PSPetstore/PSPetstore.psm1 index 5eb604b26035..f0637343093c 100644 --- a/samples/client/petstore/powershell-experimental/src/PSPetstore/PSPetstore.psm1 +++ b/samples/client/petstore/powershell-experimental/src/PSPetstore/PSPetstore.psm1 @@ -7,6 +7,9 @@ #region Import functions +# set $ErrorActionPreference to 'Stop' globally +$ErrorActionPreference = 'Stop' + # store the API client's configuration $Script:Configuration = [System.Collections.HashTable]@{}