Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 78f91a5

Browse files
committed
wip: revert back
1 parent 78c9480 commit 78f91a5

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

windows-rdp/main.tf

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,17 @@ resource "coder_script" "windows-rdp" {
6262
6363
# Install the module with the specified version for all users
6464
# This requires administrator privileges
65-
Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
66-
67-
# try {
68-
# # Install-PackageProvider is required for AWS. Need to set command to
69-
# # terminate on failure so that try/catch actually triggers
70-
# Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -ErrorAction Stop
71-
# Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
72-
# }
73-
# catch {
74-
# # If the first command failed, assume that we're on GCP and run
75-
# # Install-Module only
76-
# Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
77-
# }
65+
try {
66+
# Install-PackageProvider is required for AWS. Need to set command to
67+
# terminate on failure so that try/catch actually triggers
68+
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -ErrorAction Stop
69+
Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
70+
}
71+
catch {
72+
# If the first command failed, assume that we're on GCP and run
73+
# Install-Module only
74+
Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
75+
}
7876
7977
# Construct the module path for system-wide installation
8078
$moduleBasePath = "C:\Windows\system32\config\systemprofile\Documents\PowerShell\Modules\$moduleName\$moduleVersion"

0 commit comments

Comments
 (0)