Skip to content

Commit 82d594f

Browse files
live1206Copilot
andauthored
get service-dir from csharp options if specified (Azure#50970)
* get service-dir from csharp options if specified * Update eng/scripts/automation/GenerateAndBuildLib.ps1 Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent a9389a7 commit 82d594f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

eng/scripts/automation/GenerateAndBuildLib.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,8 +917,14 @@ function GetSDKProjectFolder()
917917
if ($yml["parameters"] -And $yml["parameters"]["service-dir"]) {
918918
$service = $yml["parameters"]["service-dir"]["default"];
919919
}
920-
if ($yml["options"] -And $yml["options"]["@azure-tools/typespec-csharp"] -And $yml["options"]["@azure-tools/typespec-csharp"]["package-dir"]) {
921-
$packageDir = $yml["options"]["@azure-tools/typespec-csharp"]["package-dir"]
920+
if ($yml["options"] -And $yml["options"]["@azure-tools/typespec-csharp"]) {
921+
$csharpOpts = $yml["options"]["@azure-tools/typespec-csharp"]
922+
if ($csharpOpts["package-dir"]) {
923+
$packageDir = $csharpOpts["package-dir"]
924+
}
925+
if ($csharpOpts["service-dir"]) {
926+
$service = $csharpOpts["service-dir"]
927+
}
922928
}
923929
}
924930
if (!$service || !$packageDir) {

0 commit comments

Comments
 (0)