diff --git a/scripts/install-windows-dev.ps1 b/scripts/install-windows-dev.ps1 index 0b821548..12c9d0d7 100644 --- a/scripts/install-windows-dev.ps1 +++ b/scripts/install-windows-dev.ps1 @@ -185,7 +185,7 @@ function install_git { } else { try { - git | Out-Null + Get-Command git -ErrorAction Stop | Out-Null Write-Host "Git is already installed. Nice!" } catch [System.Management.Automation.CommandNotFoundException] { diff --git a/scripts/install-windows.ps1 b/scripts/install-windows.ps1 index d1a319e0..3ed88e7e 100644 --- a/scripts/install-windows.ps1 +++ b/scripts/install-windows.ps1 @@ -176,7 +176,7 @@ function install_git { } else { try { - git | Out-Null + Get-Command git -ErrorAction Stop | Out-Null Write-Host "Git is already installed. Nice!" } catch [System.Management.Automation.CommandNotFoundException] {