Skip to content

Commit

Permalink
better display (#16393)
Browse files Browse the repository at this point in the history
  • Loading branch information
msyyc authored Jan 28, 2021
1 parent e36e23c commit e973776
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/automation_generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ python -m packaging_tools.auto_codegen "$1" "$TMPDIR/venv-sdk/auto_temp.json" 2>
echo "[Generate] codegen done!!!"
python -m packaging_tools.auto_package "$TMPDIR/venv-sdk/auto_temp.json" "$2" 2>&1
echo "[Generate] generate done!!!"

if [ ! -f "$2" ]; then
echo "$2 does not exist!!!"
exit 1
fi
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ def execute_simple_command(cmd_line, cwd=None, shell=False, env=None):
process.wait()
output = "\n".join(output_buffer)
if process.returncode:
# print necessary error info
for i in range(-min(len(output_buffer), 5), 0):
print(f'[Autorest] {output_buffer[i]}')

raise subprocess.CalledProcessError(
process.returncode,
cmd_line,
Expand Down

0 comments on commit e973776

Please sign in to comment.