From 5d3718187544d8cffd61ef3e483056dd6d3bf068 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 16 Aug 2024 15:16:56 +0200 Subject: [PATCH] Generate env variables using shorthand scripts --- scripts/Windows/Scripts/PowerManagement.ps1 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/Windows/Scripts/PowerManagement.ps1 b/scripts/Windows/Scripts/PowerManagement.ps1 index 7bef6087..ef48c1f1 100644 --- a/scripts/Windows/Scripts/PowerManagement.ps1 +++ b/scripts/Windows/Scripts/PowerManagement.ps1 @@ -52,13 +52,7 @@ $null = New-Module { #> function Get-StartupArguments { "-Command " + - (& { - if ($env:PWSH_PATH) { - "`$env:PWSH_PATH = $(ConvertTo-Injection $env:PWSH_PATH);" - } else { - "" - } - }) + + ($env:PWSH_PATH ? "`$env:PWSH_PATH = $(ConvertTo-Injection $env:PWSH_PATH);" : "") + ($env:DEBUG ? "`$env:DEBUG = $([int]$env:DEBUG)" : "") + "`$env:INSTALLER_SCRIPT = $(ConvertTo-Injection (Resolve-Path $env:INSTALLER_SCRIPT));" + "`$env:CONFIG_MODULE = $(ConvertTo-Injection (Resolve-Path $env:CONFIG_MODULE));" +