Fix handling of setup stages
This commit is contained in:
parent
2a7adfeba3
commit
d7cc1a53bf
|
@ -84,7 +84,13 @@ $null = New-Module {
|
|||
Gets the name of the current setup stage.
|
||||
#>
|
||||
function Get-Stage {
|
||||
return [SetupStage](Get-SetupOption $stageOption);
|
||||
$stage = Get-SetupOption $stageOption;
|
||||
|
||||
if ($null -ne $stage) {
|
||||
$stage = [SetupStage]$stage;
|
||||
}
|
||||
|
||||
return $stage;
|
||||
}
|
||||
|
||||
<#
|
||||
|
@ -99,7 +105,7 @@ $null = New-Module {
|
|||
$Name
|
||||
)
|
||||
|
||||
if (-not ($Name -is [string])) {
|
||||
if (-not (($null -eq $Name) -or ($Name -is [string]))) {
|
||||
$Name = ([SetupStage]$Name).ToString();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue