Redirect parameters using args
This commit is contained in:
parent
68e679224f
commit
14b0ffe24b
47 changed files with 75 additions and 366 deletions
scripts/Windows/Software/git
|
@ -1,22 +1,13 @@
|
|||
param (
|
||||
$Action,
|
||||
[hashtable] $Arguments
|
||||
)
|
||||
|
||||
. "$PSScriptRoot/../../Scripts/SoftwareManagement.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Scripts/Config.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
|
||||
|
||||
& {
|
||||
param(
|
||||
[hashtable] $Parameters
|
||||
)
|
||||
|
||||
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
|
||||
$base = "$PSScriptRoot/../../../Common/Software/git/Manage.ps1";
|
||||
|
||||
Start-SoftwareInstaller @Parameters `
|
||||
Start-SoftwareInstaller @args `
|
||||
-Installer {
|
||||
$params = "/WindowsTerminalProfile";
|
||||
$defaultBranch = Get-OSConfig "git.defaultBranch";
|
||||
|
@ -28,13 +19,9 @@ param (
|
|||
Install-ChocoPackage git -ArgumentList "--params",$params;
|
||||
} `
|
||||
-Configurator {
|
||||
& $base ([InstallerAction]::Configure);
|
||||
& $base ([InstallerAction]::Configure) @args;
|
||||
} `
|
||||
-UserConfigurator {
|
||||
param(
|
||||
$Arguments
|
||||
)
|
||||
|
||||
& $base ([InstallerAction]::ConfigureUser) @PSBoundParameterrs;
|
||||
& $base ([InstallerAction]::ConfigureUser) @args;
|
||||
};
|
||||
} $PSBoundParameters;
|
||||
} @args;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue