Allow overriding base installer action
This commit is contained in:
parent
09cac4e333
commit
c6425ccd65
1 changed files with 7 additions and 2 deletions
|
@ -35,6 +35,11 @@ $null = New-Module {
|
|||
}
|
||||
};
|
||||
|
||||
$runBase = {
|
||||
$defaults = @{ action = $Action };
|
||||
& "$Inherit" @defaults @args;
|
||||
};
|
||||
|
||||
if (-not $Name) {
|
||||
$Name = Split-Path -Leaf (Split-Path -Parent ((Get-PSCallStack)[1].ScriptName));
|
||||
}
|
||||
|
@ -50,7 +55,7 @@ $null = New-Module {
|
|||
$parameters = $parameters + @("-Force");
|
||||
}
|
||||
|
||||
& $Inherit -Action $Action @parameters
|
||||
& $runBase @parameters
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +90,7 @@ $null = New-Module {
|
|||
installer = $installHandler;
|
||||
arguments = $Arguments;
|
||||
context = $Context;
|
||||
base = { & "$Inherit" -Action $Action $args };
|
||||
base = { & $runBase @args };
|
||||
};
|
||||
|
||||
switch ($Action) {
|
||||
|
|
Loading…
Reference in a new issue