Add function for generating startup command
This commit is contained in:
parent
682571eeba
commit
f468804c95
|
@ -43,15 +43,14 @@ $null = New-Module {
|
|||
Generates a script for executing the installer.
|
||||
#>
|
||||
function Get-StartupScript {
|
||||
"pwsh " + (Get-StartupArguments);
|
||||
"pwsh -Command " + (Get-StartupCommand);
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Generates arguments for running the installer using `pwsh`.
|
||||
Generates a command for running the installer using `pwsh`.
|
||||
#>
|
||||
function Get-StartupArguments {
|
||||
"-Command " +
|
||||
function Get-StartupCommand {
|
||||
($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));" +
|
||||
|
|
Loading…
Reference in a new issue