8000 fix order · coder/modules@cb075aa · GitHub
[go: up one dir, main page]

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

Commit cb075aa

Browse files
authored
fix order
1 parent 9864408 commit cb075aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

windows-rdp/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,13 @@ resource "coder_script" "windows-rdp" {
6060
$moduleName = "DevolutionsGateway"
6161
$moduleVersion = "2024.1.5"
6262
63+
Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force -Confirm:$false -SkipPublisherCheck
64+
6365
try {
6466
# Try to import the module directly
6567
Import-Module $moduleName -ErrorAction Stop
6668
} catch {
6769
# If it fails, install and then import the module
68-
Install-Module -Name $moduleName -RequiredVersion $moduleVersion -Force -Confirm:$false -SkipPublisherCheck
6970
7071
# Construct the module path for system-wide installation
7172
$moduleBasePath = "C:\Windows\system32\config\systemprofile\Documents\PowerShell\Modules\$moduleName\$moduleVersion"

0 commit comments

Comments
 (0)
0