Skip to content

Commit ac56657

Browse files
authored
sdk automation, fix global catch (Azure#44789)
* use scriptError instead of showInComments * fix global catch
1 parent d95e597 commit ac56657

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

eng/automation/generate.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ def sdk_automation(input_file: str, output_file: str):
120120
packages = sdk_automation_autorest(config)
121121
except Exception:
122122
logging.error("[GENERATE] Code generation failed. Unknown exception", exc_info=True)
123+
if packages and len(packages) == 1:
124+
packages[0]["result"] = "failed"
125+
else:
126+
sys.exit(1)
123127

124128
with open(output_file, "w", encoding="utf-8") as fout:
125129
output = {

0 commit comments

Comments
 (0)