39 lines
1 KiB
PowerShell
39 lines
1 KiB
PowerShell
param (
|
|
$Action,
|
|
[hashtable] $Arguments
|
|
)
|
|
|
|
. "$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 `
|
|
-Installer {
|
|
$params = "/WindowsTerminalProfile";
|
|
$defaultBranch = Get-OSConfig "git.defaultBranch";
|
|
|
|
if ($defaultBranch) {
|
|
$params += " /DefaultBranchName:`"$defaultBranch`"";
|
|
}
|
|
|
|
Install-ChocoPackage git -ArgumentList "--params",$params;
|
|
} `
|
|
-Configurator {
|
|
& $base ([InstallerAction]::Configure);
|
|
} `
|
|
-UserConfigurator {
|
|
param(
|
|
$Arguments
|
|
)
|
|
|
|
& $base ([InstallerAction]::ConfigureUser) @PSBoundParameterrs;
|
|
};
|
|
} $PSBoundParameters;
|