From 364aa259b9136f7892929f5a20bc73ee52d93904 Mon Sep 17 00:00:00 2001 From: Keith Hill Date: Sun, 31 Dec 2017 00:54:19 -0700 Subject: [PATCH] Fix #500 errors generated by Add-Member This adds the -Force paramteter as recommended by the error message. --- src/GitUtils.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/GitUtils.ps1 b/src/GitUtils.ps1 index fb27a39e6..0c221c41c 100644 --- a/src/GitUtils.ps1 +++ b/src/GitUtils.ps1 @@ -295,16 +295,16 @@ function Get-GitStatus($gitDir = (Get-GitDirectory)) { $indexPaths = @(GetUniquePaths $indexAdded,$indexModified,$indexDeleted,$indexUnmerged) $workingPaths = @(GetUniquePaths $filesAdded,$filesModified,$filesDeleted,$filesUnmerged) $index = (,$indexPaths) | - Add-Member -PassThru NoteProperty Added $indexAdded.ToArray() | - Add-Member -PassThru NoteProperty Modified $indexModified.ToArray() | - Add-Member -PassThru NoteProperty Deleted $indexDeleted.ToArray() | - Add-Member -PassThru NoteProperty Unmerged $indexUnmerged.ToArray() + Add-Member -Force -PassThru NoteProperty Added $indexAdded.ToArray() | + Add-Member -Force -PassThru NoteProperty Modified $indexModified.ToArray() | + Add-Member -Force -PassThru NoteProperty Deleted $indexDeleted.ToArray() | + Add-Member -Force -PassThru NoteProperty Unmerged $indexUnmerged.ToArray() $working = (,$workingPaths) | - Add-Member -PassThru NoteProperty Added $filesAdded | - Add-Member -PassThru NoteProperty Modified $filesModified.ToArray() | - Add-Member -PassThru NoteProperty Deleted $filesDeleted.ToArray() | - Add-Member -PassThru NoteProperty Unmerged $filesUnmerged.ToArray() + Add-Member -Force -PassThru NoteProperty Added $filesAdded | + Add-Member -Force -PassThru NoteProperty Modified $filesModified.ToArray() | + Add-Member -Force -PassThru NoteProperty Deleted $filesDeleted.ToArray() | + Add-Member -Force -PassThru NoteProperty Unmerged $filesUnmerged.ToArray() $result = New-Object PSObject -Property @{ GitDir = $gitDir