Allow inheriting PowerShell installers
This commit is contained in:
parent
4504ca85d4
commit
d9d1575a19
8 changed files with 64 additions and 97 deletions
scripts/Windows/Software/git
|
@ -3,25 +3,15 @@
|
|||
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
|
||||
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
|
||||
|
||||
& {
|
||||
. "$PSScriptRoot/../../../Common/Types/InstallerAction.ps1";
|
||||
$base = "$PSScriptRoot/../../../Common/Software/git/Manage.ps1";
|
||||
Start-SoftwareInstaller @args `
|
||||
-Inherit "$PSScriptRoot/../../../Common/Software/git/Manage.ps1" `
|
||||
-Installer {
|
||||
$params = "/WindowsTerminalProfile";
|
||||
$defaultBranch = Get-OSConfig "git.defaultBranch";
|
||||
|
||||
Start-SoftwareInstaller @args `
|
||||
-Installer {
|
||||
$params = "/WindowsTerminalProfile";
|
||||
$defaultBranch = Get-OSConfig "git.defaultBranch";
|
||||
if ($defaultBranch) {
|
||||
$params += " /DefaultBranchName:`"$defaultBranch`"";
|
||||
}
|
||||
|
||||
if ($defaultBranch) {
|
||||
$params += " /DefaultBranchName:`"$defaultBranch`"";
|
||||
}
|
||||
|
||||
Install-ChocoPackage git -ArgumentList "--params", $params;
|
||||
} `
|
||||
-Configurator {
|
||||
& $base ([InstallerAction]::Configure) @args;
|
||||
} `
|
||||
-UserConfigurator {
|
||||
& $base ([InstallerAction]::ConfigureUser) @args;
|
||||
};
|
||||
} @args;
|
||||
Install-ChocoPackage git -ArgumentList "--params", $params;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue