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

Commit 4ab7257

Browse files
committed
fix: remove accidental uncaught code
1 parent f369697 commit 4ab7257

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

windows-rdp/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ resource "coder_script" "windows-rdp" {
6363
# Install the module with the specified version for all users
6464
# This requires administrator privileges
6565
try {
66+
# Install-PackageProvider is required for AWS
6667
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
6768
Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
6869
} catch {
70+
# If the first command failed, assume that we're on GCP and run
71+
# Install-Module only
6972
Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
7073
}
71-
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
72-
Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force
7374
7475
# Construct the module path for system-wide installation
7576
$moduleBasePath = "C:\Windows\system32\config\systemprofile\Documents\PowerShell\Modules\$moduleName\$moduleVersion"

0 commit comments

Comments
 (0)