Skip to content

Commit

Permalink
add back git changes bc of ci failure
Browse files Browse the repository at this point in the history
  • Loading branch information
iscai-msft committed Oct 17, 2024
1 parent 4a322ad commit 3dc90ec
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/http-client-python/eng/scripts/Check-GitChanges.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#Requires -Version 7.0

param(
[string] $Exceptions
)

$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 3.0
$packageRoot = (Resolve-Path "$PSScriptRoot/../..").Path.Replace('\', '/')
. "$packageRoot/../../eng/emitters/scripts/CommandInvocation-Helpers.ps1"
Set-ConsoleEncoding

$diffExcludes = @(
"$packageRoot/package.json"
"$packageRoot/package-lock.json"
) | ForEach-Object { "`":(exclude)$_`"" } | Join-String -Separator ' '

Invoke-LoggedCommand "git -c core.safecrlf=false diff --ignore-space-at-eol --exit-code -- $diffExcludes" -IgnoreExitCode

if($LastExitCode -ne 0) {
throw "Changes detected"
}

0 comments on commit 3dc90ec

Please sign in to comment.