From 0e34d50eff3322104e91b08f76b66fc85b42c67d Mon Sep 17 00:00:00 2001 From: ajshastri Date: Mon, 29 Jan 2024 09:36:04 -0800 Subject: [PATCH] Added ErrorActionPreference to missing packages --- JMC/tools/chocolateyinstall.ps1 | 1 + OpenJDK/tools/chocolateyinstall.ps1 | 1 + WildFly/tools/chocolateyinstall.ps1 | 1 + corretto-jdk-11/tools/chocolateyinstall.ps1 | 1 + corretto-jdk-17/tools/chocolateyinstall.ps1 | 1 + corretto-jdk-21/tools/chocolateyinstall.ps1 | 1 + corretto-jdk-8/tools/chocolateyinstall.ps1 | 1 + corretto-jdk/tools/chocolateyinstall.ps1 | 1 + corretto-jre-8/tools/chocolateyinstall.ps1 | 1 + httpd-apache/tools/chocolateyInstall.ps1 | 3 ++- mvndaemon/tools/chocolateyinstall.ps1 | 1 + sapmachine-11-jdk/tools/chocolateyinstall.ps1 | 1 + sapmachine-11-jre/tools/chocolateyinstall.ps1 | 1 + sapmachine-17-jdk/tools/chocolateyinstall.ps1 | 1 + sapmachine-17-jre/tools/chocolateyinstall.ps1 | 1 + sapmachine-21-jdk/tools/chocolateyinstall.ps1 | 1 + sapmachine-21-jre/tools/chocolateyinstall.ps1 | 1 + sapmachine-jdk/tools/chocolateyinstall.ps1 | 1 + sapmachine-jre/tools/chocolateyinstall.ps1 | 1 + 19 files changed, 20 insertions(+), 1 deletion(-) diff --git a/JMC/tools/chocolateyinstall.ps1 b/JMC/tools/chocolateyinstall.ps1 index 735aef0..10b5d54 100644 --- a/JMC/tools/chocolateyinstall.ps1 +++ b/JMC/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' # Path to the folder where the script is executing $toolsDir = (Split-Path -parent $MyInvocation.MyCommand.Definition) diff --git a/OpenJDK/tools/chocolateyinstall.ps1 b/OpenJDK/tools/chocolateyinstall.ps1 index 4133453..79cd447 100644 --- a/OpenJDK/tools/chocolateyinstall.ps1 +++ b/OpenJDK/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $programFiles = (${env:ProgramFiles}, ${env:ProgramFiles(x86)} -ne $null)[0] $installDir = "$programFiles\OpenJDK" diff --git a/WildFly/tools/chocolateyinstall.ps1 b/WildFly/tools/chocolateyinstall.ps1 index 9d77074..4eda710 100644 --- a/WildFly/tools/chocolateyinstall.ps1 +++ b/WildFly/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $programFiles = (${env:ProgramFiles}, ${env:ProgramFiles(x86)} -ne $null)[0] $installDir = "$programFiles\WildFly" diff --git a/corretto-jdk-11/tools/chocolateyinstall.ps1 b/corretto-jdk-11/tools/chocolateyinstall.ps1 index 9802797..c504686 100644 --- a/corretto-jdk-11/tools/chocolateyinstall.ps1 +++ b/corretto-jdk-11/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://corretto.aws/downloads/resources/11.0.22.7.1/amazon-corretto-11.0.22.7.1-windows-x64.msi' diff --git a/corretto-jdk-17/tools/chocolateyinstall.ps1 b/corretto-jdk-17/tools/chocolateyinstall.ps1 index dba7924..e2a5254 100644 --- a/corretto-jdk-17/tools/chocolateyinstall.ps1 +++ b/corretto-jdk-17/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://corretto.aws/downloads/resources/17.0.10.7.1/amazon-corretto-17.0.10.7.1-windows-x64.msi' diff --git a/corretto-jdk-21/tools/chocolateyinstall.ps1 b/corretto-jdk-21/tools/chocolateyinstall.ps1 index 2c77939..928897e 100644 --- a/corretto-jdk-21/tools/chocolateyinstall.ps1 +++ b/corretto-jdk-21/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://corretto.aws/downloads/resources/21.0.2.13.1/amazon-corretto-21.0.2.13.1-windows-x64.msi' diff --git a/corretto-jdk-8/tools/chocolateyinstall.ps1 b/corretto-jdk-8/tools/chocolateyinstall.ps1 index 1049438..9135ba7 100644 --- a/corretto-jdk-8/tools/chocolateyinstall.ps1 +++ b/corretto-jdk-8/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://corretto.aws/downloads/resources/8.402.08.1/amazon-corretto-8.402.08.1-windows-x64-jdk.msi' diff --git a/corretto-jdk/tools/chocolateyinstall.ps1 b/corretto-jdk/tools/chocolateyinstall.ps1 index d53af3c..55bd620 100644 --- a/corretto-jdk/tools/chocolateyinstall.ps1 +++ b/corretto-jdk/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://corretto.aws/downloads/resources/21.0.2.13.1/amazon-corretto-21.0.2.13.1-windows-x64.msi' diff --git a/corretto-jre-8/tools/chocolateyinstall.ps1 b/corretto-jre-8/tools/chocolateyinstall.ps1 index 0e252ee..c5f037c 100644 --- a/corretto-jre-8/tools/chocolateyinstall.ps1 +++ b/corretto-jre-8/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://corretto.aws/downloads/resources/8.402.08.1/amazon-corretto-8.402.08.1-windows-x64-jre.msi' diff --git a/httpd-apache/tools/chocolateyInstall.ps1 b/httpd-apache/tools/chocolateyInstall.ps1 index 830ea1a..40f6463 100644 --- a/httpd-apache/tools/chocolateyInstall.ps1 +++ b/httpd-apache/tools/chocolateyInstall.ps1 @@ -1,4 +1,5 @@ -$toolsDir = Split-Path -parent $MyInvocation.MyCommand.Definition +$ErrorActionPreference = 'Stop' +$toolsDir = Split-Path -parent $MyInvocation.MyCommand.Definition . "$toolsDir\helpers.ps1" $pp = Get-PackageParameters diff --git a/mvndaemon/tools/chocolateyinstall.ps1 b/mvndaemon/tools/chocolateyinstall.ps1 index cd3598a..a9a1df2 100644 --- a/mvndaemon/tools/chocolateyinstall.ps1 +++ b/mvndaemon/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $programFiles = (${env:ProgramFiles}, ${env:ProgramFiles(x86)} -ne $null)[0] $installDir = "$programFiles\mvndaemon" diff --git a/sapmachine-11-jdk/tools/chocolateyinstall.ps1 b/sapmachine-11-jdk/tools/chocolateyinstall.ps1 index ed41c8b..68e540a 100644 --- a/sapmachine-11-jdk/tools/chocolateyinstall.ps1 +++ b/sapmachine-11-jdk/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jdk-11.0.22_windows-x64_bin.msi' diff --git a/sapmachine-11-jre/tools/chocolateyinstall.ps1 b/sapmachine-11-jre/tools/chocolateyinstall.ps1 index f91a595..e247bce 100644 --- a/sapmachine-11-jre/tools/chocolateyinstall.ps1 +++ b/sapmachine-11-jre/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jre-11.0.22_windows-x64_bin.msi' diff --git a/sapmachine-17-jdk/tools/chocolateyinstall.ps1 b/sapmachine-17-jdk/tools/chocolateyinstall.ps1 index 3a023c2..786bcb3 100644 --- a/sapmachine-17-jdk/tools/chocolateyinstall.ps1 +++ b/sapmachine-17-jdk/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_windows-x64_bin.msi' diff --git a/sapmachine-17-jre/tools/chocolateyinstall.ps1 b/sapmachine-17-jre/tools/chocolateyinstall.ps1 index f6b64d3..4749515 100644 --- a/sapmachine-17-jre/tools/chocolateyinstall.ps1 +++ b/sapmachine-17-jre/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_windows-x64_bin.msi' diff --git a/sapmachine-21-jdk/tools/chocolateyinstall.ps1 b/sapmachine-21-jdk/tools/chocolateyinstall.ps1 index 1edb56d..293cec0 100644 --- a/sapmachine-21-jdk/tools/chocolateyinstall.ps1 +++ b/sapmachine-21-jdk/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jdk-21.0.2_windows-x64_bin.msi' diff --git a/sapmachine-21-jre/tools/chocolateyinstall.ps1 b/sapmachine-21-jre/tools/chocolateyinstall.ps1 index 92f74a7..2b42990 100644 --- a/sapmachine-21-jre/tools/chocolateyinstall.ps1 +++ b/sapmachine-21-jre/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jre-21.0.2_windows-x64_bin.msi' diff --git a/sapmachine-jdk/tools/chocolateyinstall.ps1 b/sapmachine-jdk/tools/chocolateyinstall.ps1 index 1edb56d..293cec0 100644 --- a/sapmachine-jdk/tools/chocolateyinstall.ps1 +++ b/sapmachine-jdk/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jdk-21.0.2_windows-x64_bin.msi' diff --git a/sapmachine-jre/tools/chocolateyinstall.ps1 b/sapmachine-jre/tools/chocolateyinstall.ps1 index 92f74a7..2b42990 100644 --- a/sapmachine-jre/tools/chocolateyinstall.ps1 +++ b/sapmachine-jre/tools/chocolateyinstall.ps1 @@ -1,3 +1,4 @@ +$ErrorActionPreference = 'Stop' $packageArgs = @{ PackageName = $env:ChocolateyPackageName Url64bit = 'https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jre-21.0.2_windows-x64_bin.msi'