mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
$ErrorActionPreference='Stop' for AllUsersAllHosts
This commit is contained in:
@@ -27,8 +27,6 @@ Function Set-DefaultVariables
|
||||
}
|
||||
}
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Import-Module -Name ImageHelpers -Force -DisableNameChecking
|
||||
|
||||
# Define executables for cached tools
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
Write-Host "Cleanup WinSxS"
|
||||
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
|
||||
|
||||
$ErrorActionPreference = 'silentlycontinue'
|
||||
|
||||
Write-Host "Clean up various directories"
|
||||
@(
|
||||
"C:\\Recovery",
|
||||
@@ -30,4 +28,5 @@ Write-Host "Clean up various directories"
|
||||
$winInstallDir = "$env:windir\\Installer"
|
||||
New-Item -Path $winInstallDir -ItemType Directory -Force
|
||||
|
||||
$ErrorActionPreference = 'Continue'
|
||||
# Remove AllUsersAllHosts profile
|
||||
Remove-Item $profile.AllUsersAllHosts -Force
|
||||
|
||||
@@ -30,6 +30,9 @@ function Disable-UserAccessControl {
|
||||
Write-Host "User Access Control (UAC) has been disabled."
|
||||
}
|
||||
|
||||
# Enable $ErrorActionPreference='Stop' for AllUsersAllHosts
|
||||
Add-Content -Path $profile.AllUsersAllHosts -Value '$ErrorActionPreference="Stop"'
|
||||
|
||||
# Set TLS1.2
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor "Tls12"
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
## Desc: Install Azure PowerShell modules
|
||||
################################################################################
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# The correct Modules need to be saved in C:\Modules
|
||||
$installPSModulePath = $env:PSMODULES_ROOT_FOLDER
|
||||
if (-not (Test-Path -LiteralPath $installPSModulePath))
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
## File: Install-PHP.ps1
|
||||
## Desc: Install PHP
|
||||
################################################################################
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Import-Module -Name ImageHelpers
|
||||
|
||||
# Install latest PHP in chocolatey
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
#Define user and password for PostgreSQL database
|
||||
$pgUser = "postgres"
|
||||
$pgPwd = "root"
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# Set TLS1.2
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor "Tls12"
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ function Install-PyPy
|
||||
}
|
||||
}
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
Import-Module -Name ImageHelpers -Force -DisableNameChecking
|
||||
|
||||
# Get PyPy content from toolset
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
## File: Install-Sbt.ps1
|
||||
## Desc: Install sbt for Windows
|
||||
################################################################################
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Import-Module -Name ImageHelpers
|
||||
|
||||
# Install the latest version of sbt.
|
||||
|
||||
@@ -29,8 +29,6 @@ Function Install-Asset {
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Import-Module -Name ImageHelpers -Force
|
||||
|
||||
# Get toolcache content from toolset
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
## Desc: Install Visual Studio
|
||||
################################################################################
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$toolset = Get-ToolsetContent
|
||||
$requiredComponents = $toolset.visualStudio.workloads | ForEach-Object { "--add $_" }
|
||||
$workLoads = @(
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
## Desc: Install the Visual Studio Extensions from toolset.json
|
||||
###################################################################################
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$toolset = Get-ToolsetContent
|
||||
$vsixPackagesList = $toolset.visualStudio.vsix
|
||||
if (-not $vsixPackagesList) {
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
## Desc: Install and update Android SDK and tools
|
||||
################################################################################
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# Install the standard Android SDK licenses. In the past, there wasn't a better way to do this,
|
||||
# so we are base64-encoding a zip of the licenses directory from another installation.
|
||||
# To create this base64 string, create a zip file that contains nothing but a 'licenses' folder,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Import-Module MarkdownPS
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Android.psm1") -DisableNameChecking
|
||||
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Browsers.psm1") -DisableNameChecking
|
||||
|
||||
Reference in New Issue
Block a user