From 0999906ea1f578b7bfa1b5489c671b8d7b58db32 Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Mon, 1 Apr 2024 18:44:56 -0700 Subject: [PATCH] pshell 7.4 broke resolve-assets-conflict.ps1. this update resolves the problem (#7986) --- eng/common/scripts/Helpers/git-helpers.ps1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eng/common/scripts/Helpers/git-helpers.ps1 b/eng/common/scripts/Helpers/git-helpers.ps1 index 2365304bedc..63f34eca518 100644 --- a/eng/common/scripts/Helpers/git-helpers.ps1 +++ b/eng/common/scripts/Helpers/git-helpers.ps1 @@ -65,8 +65,9 @@ class ConflictedFile { # powershell ignores the newlines with and without --textconv, which results in a json file without original spacing. # by forcefully reading into the array line by line, the whitespace is preserved. we're relying on gits autoconverstion of clrf to lf # to ensure that the line endings are consistent. - Write-Host "git show $($this.LeftSource):$($this.Path)" - $tempContent = git show ("$($this.LeftSource):$($this.Path)") + $toShow = "$($this.LeftSource):$($this.Path)" -replace "\\", "/" + Write-Host "git show $toShow" + $tempContent = git show $toShow return $tempContent -split "`r?`n" } else { @@ -76,8 +77,9 @@ class ConflictedFile { [array] Right(){ if ($this.IsConflicted) { - Write-Host "git show $($this.RightSource):$($this.Path)" - $tempContent = git show ("$($this.RightSource):$($this.Path)") + $toShow = "$($this.RightSource):$($this.Path)" -replace "\\", "/" + Write-Host "git show $toShow" + $tempContent = git show $toShow return $tempContent -split "`r?`n" } else {