Skip to content

Commit 9598d11

Browse files
authored
fix for pipeline (#42269)
1 parent f1498d7 commit 9598d11

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/azure-sdk-tools/packaging_tools/generate_utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ def del_outdated_generated_files(tsp: str):
3737
with open(tspconfig, "r") as file_in:
3838
content = yaml.safe_load(file_in)
3939
# tspconfig.yaml example: https://github.com/Azure/azure-rest-api-specs/pull/29080/files
40-
service_dir = content.get("parameters", {}).get("service-dir", {}).get("default", "")
41-
package_dir = content.get("options", {}).get("@azure-tools/typespec-python", {}).get("package-dir", "")
40+
typespec_python_config = content.get("options", {}).get("@azure-tools/typespec-python", {})
41+
service_dir = typespec_python_config.get("service-dir") or content.get("parameters", {}).get("service-dir", {}).get(
42+
"default", ""
43+
)
44+
package_dir = typespec_python_config.get("package-dir", "")
4245
if not service_dir or not package_dir:
4346
_LOGGER.info(f"do not find service-dir or package-dir in tspconfig.yaml: {tspconfig}")
4447
return

0 commit comments

Comments
 (0)