Skip PWSH_PATH
if undefined
This commit is contained in:
parent
e768c55e58
commit
c79d632639
1 changed files with 7 additions and 1 deletions
|
@ -30,7 +30,13 @@ $null = New-Module {
|
||||||
|
|
||||||
Set-ItemProperty -Path $key.PSPath -Name $runOnceName -Type "ExpandString" -Value (
|
Set-ItemProperty -Path $key.PSPath -Name $runOnceName -Type "ExpandString" -Value (
|
||||||
"pwsh -Command " +
|
"pwsh -Command " +
|
||||||
"`$env:PWSH_PATH = $(ConvertTo-Injection $env:PWSH_PATH);" +
|
(& {
|
||||||
|
if ($env:PWSH_PATH) {
|
||||||
|
"`$env:PWSH_PATH = $(ConvertTo-Injection $env:PWSH_PATH);"
|
||||||
|
} else {
|
||||||
|
""
|
||||||
|
}
|
||||||
|
}) +
|
||||||
"`$env:INSTALLER_SCRIPT = $(ConvertTo-Injection $env:INSTALLER_SCRIPT);" +
|
"`$env:INSTALLER_SCRIPT = $(ConvertTo-Injection $env:INSTALLER_SCRIPT);" +
|
||||||
"`$env:CONFIG_MODULE = $(ConvertTo-Injection $env:CONFIG_MODULE);" +
|
"`$env:CONFIG_MODULE = $(ConvertTo-Injection $env:CONFIG_MODULE);" +
|
||||||
"& `$env:INSTALLER_SCRIPT;"
|
"& `$env:INSTALLER_SCRIPT;"
|
||||||
|
|
Loading…
Reference in a new issue