From f96c7b9b728fa65dce88dfd900669997f0b275ba Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Sat, 12 Oct 2024 14:04:51 +0800 Subject: [PATCH] try to resolve using external package if local build doesn't exist --- packages/http-client-csharp/eng/scripts/Generate.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/http-client-csharp/eng/scripts/Generate.ps1 b/packages/http-client-csharp/eng/scripts/Generate.ps1 index 6185449403..074164bf8a 100644 --- a/packages/http-client-csharp/eng/scripts/Generate.ps1 +++ b/packages/http-client-csharp/eng/scripts/Generate.ps1 @@ -10,7 +10,10 @@ Import-Module "$PSScriptRoot\Generation.psm1" -DisableNameChecking -Force; $packageRoot = Resolve-Path (Join-Path $PSScriptRoot '..' '..') $solutionDir = Join-Path $packageRoot 'generator' # absolute path to locally built emitter module -$emitterPath = Resolve-Path (Join-Path $PSScriptRoot '..' '..' 'dist' 'emitter\') +$emitterPath = Resolve-Path (Join-Path $PSScriptRoot '..' '..' 'dist' 'emitter\') -ErrorAction SilentlyContinue +if (-not $emitterPath) { + $emitterPath = "@typespec/http-client-csharp" +} if (-not $LaunchOnly) { Refresh-Build