Generate env variables using shorthand scripts

This commit is contained in:
Manuel Thalmann 2024-08-16 15:16:56 +02:00
parent 2034f5c9f6
commit 1701213a77

View file

@ -52,13 +52,7 @@ $null = New-Module {
#> #>
function Get-StartupArguments { function Get-StartupArguments {
"-Command " + "-Command " +
(& { ($env:PWSH_PATH ? "`$env:PWSH_PATH = $(ConvertTo-Injection $env:PWSH_PATH);" : "") +
if ($env:PWSH_PATH) {
"`$env:PWSH_PATH = $(ConvertTo-Injection $env:PWSH_PATH);"
} else {
""
}
}) +
($env:DEBUG ? "`$env:DEBUG = $([int]$env:DEBUG)" : "") + ($env:DEBUG ? "`$env:DEBUG = $([int]$env:DEBUG)" : "") +
"`$env:INSTALLER_SCRIPT = $(ConvertTo-Injection (Resolve-Path $env:INSTALLER_SCRIPT));" + "`$env:INSTALLER_SCRIPT = $(ConvertTo-Injection (Resolve-Path $env:INSTALLER_SCRIPT));" +
"`$env:CONFIG_MODULE = $(ConvertTo-Injection (Resolve-Path $env:CONFIG_MODULE));" + "`$env:CONFIG_MODULE = $(ConvertTo-Injection (Resolve-Path $env:CONFIG_MODULE));" +