Skip to content

Commit 54ba6d6

Browse files
authored
fix: check if git exists without calling the program for windows install (#178)
1 parent cf7214c commit 54ba6d6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/install-windows-dev.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function install_git {
185185
}
186186
else {
187187
try {
188-
git | Out-Null
188+
Get-Command git -ErrorAction Stop | Out-Null
189189
Write-Host "Git is already installed. Nice!"
190190
}
191191
catch [System.Management.Automation.CommandNotFoundException] {

scripts/install-windows.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function install_git {
176176
}
177177
else {
178178
try {
179-
git | Out-Null
179+
Get-Command git -ErrorAction Stop | Out-Null
180180
Write-Host "Git is already installed. Nice!"
181181
}
182182
catch [System.Management.Automation.CommandNotFoundException] {

0 commit comments

Comments
 (0)