File tree Expand file tree Collapse file tree 2 files changed +15
-67
lines changed Expand file tree Collapse file tree 2 files changed +15
-67
lines changed Original file line number Diff line number Diff line change 33$ErrorActionPreference = ' Stop'
44Set-StrictMode - Version 3.0
55
6- & " $PSScriptRoot /Generate-Code.ps1"
6+ $packageRoot = Resolve-Path " $PSScriptRoot ../../../packages/http-client-csharp"
7+ Push-Location $packageRoot
78
8- Write-Host ' Checking generated files difference...'
9- git - c core.safecrlf= false diff -- ignore- space- at- eol -- exit-code
10- if ($LastExitCode -ne 0 ) {
11- Write-Error ' Generated codes are not up to date. Please run: eng/scripts/typespec/Generate-Code.ps1'
12- exit 1
9+ try {
10+ & " $packageRoot /eng/scripts/Generate.ps1"
11+
12+ Write-Host ' Checking generated files difference...'
13+ git - c core.safecrlf= false diff -- ignore- space- at- eol -- exit-code
14+ if ($LastExitCode -ne 0 ) {
15+ Write-Error ' Generated codes are not up to date. Please run: eng/packages/http-client-csharp/eng/scripts/Generate.ps1'
16+ exit 1
17+ }
18+ Write-Host ' Done. No change is detected.'
19+ }
20+ finally {
21+ Pop-Location
1322}
14- Write-Host ' Done. No change is detected.'
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments