Skip to content

Commit a1bb28f

Browse files
committed
Fix Pester test failures.
1 parent a27044e commit a1bb28f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

GitUtils.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function Get-GitStatus($gitDir = (Get-GitDirectory)) {
188188
$filesUnmerged = New-Object System.Collections.Generic.List[string]
189189
$stashCount = 0
190190

191-
if($settings.EnableFileStatus -and !$(InDotGitOrBareRepoDir) -and !$(InDisabledRepository)) {
191+
if($settings.EnableFileStatus -and !$(InDotGitOrBareRepoDir $gitDir) -and !$(InDisabledRepository)) {
192192
if ($settings.EnableFileStatusFromCache -eq $null) {
193193
$settings.EnableFileStatusFromCache = (Get-Module GitStatusCachePoshClient) -ne $null
194194
}

test/Get-GitStatus.Tests.ps1

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Describe 'Get-GitStatus Tests' {
44
Context 'Get-GitStatus Working Directory Tests' {
55
BeforeAll {
6+
Set-Location $PSScriptRoot
7+
68
function global:git {
79
$cmdline = "$args"
810
switch ($cmdline) {

0 commit comments

Comments
 (0)