Skip to content

Commit

Permalink
Limit gitbin to a single command
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk authored Jan 15, 2018
1 parent 4da7b87 commit 23de00c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/Shared.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ $moduleManifestPath = "$modulePath\posh-git.psd1"
$csi = [char]0x1b + "["
if (($PSVersionTable.PSVersion.Major -le 5) -or $IsWindows) {
# On Windows, we can access the git binary via git.exe
$global:gitbin = Get-Command -Name git -CommandType Application
$global:gitbin = Get-Command -Name git -CommandType Application -TotalCount 1
}
else {
# On Linux/macOS, we can access the git binary via its path /usr/bin/git
$global:gitbin = (Get-Command -Name git -CommandType Application).Path
$global:gitbin = (Get-Command -Name git -CommandType Application -TotalCount 1).Path
}

# We need this or the Git mocks don't work
Expand Down

0 comments on commit 23de00c

Please sign in to comment.