From 8812500285f5644fda59175a8686e792be86aa59 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 8 Aug 2024 05:14:31 +0200 Subject: [PATCH] Ensure `git` is installed --- scripts/Windows/OS/Install.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index 2b004533..d2cac3cd 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -47,6 +47,11 @@ $null = New-Module { continue; } + if (-not (Test-Command "git")) { + Install-ChocoPackage git; + continue; + } + if (-not (Test-ChocoPackage "powershell-core")) { Invoke-Hook "Install-PowerShellCore" -Fallback { choco install -y powershell-core --install-arguments='"ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 REGISTER_MANIFEST=1 USER_MU=1 ENABLE_MU=1"';