wip: try reverting temporarily

mes/rdp-glitch-repro
Parkreiner 10 months ago
parent 16f96d3693
commit 78c948094d

@ -62,17 +62,19 @@ resource "coder_script" "windows-rdp" {
# Install the module with the specified version for all users # Install the module with the specified version for all users
# This requires administrator privileges # This requires administrator privileges
try { Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
# Install-PackageProvider is required for AWS. Need to set command to
# terminate on failure so that try/catch actually triggers # try {
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -ErrorAction Stop # # Install-PackageProvider is required for AWS. Need to set command to
Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force # # terminate on failure so that try/catch actually triggers
} # Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -ErrorAction Stop
catch { # Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
# If the first command failed, assume that we're on GCP and run # }
# Install-Module only # catch {
Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force # # If the first command failed, assume that we're on GCP and run
} # # Install-Module only
# Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
# }
# Construct the module path for system-wide installation # Construct the module path for system-wide installation
$moduleBasePath = "C:\Windows\system32\config\systemprofile\Documents\PowerShell\Modules\$moduleName\$moduleVersion" $moduleBasePath = "C:\Windows\system32\config\systemprofile\Documents\PowerShell\Modules\$moduleName\$moduleVersion"

Loading…
Cancel
Save