Skip to content

Commit

Permalink
Fix exit code click bug (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushuk authored Jan 19, 2024
1 parent cc04cb7 commit aa2ec85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pros/cli/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ def new_project(ctx: click.Context, path: str, target: str, version: str,
if compile_after or build_cache:
with ui.Notification():
ui.echo('Building project...')
ctx.exit(project.compile([], scan_build=build_cache))
exit_code = project.compile([], scan_build=build_cache)
if exit_code != 0:
logger(__name__).error(f'Failed to make project: Exit Code {exit_code}', extra={'sentry': False})
raise click.ClickException('Failed to build')

except Exception as e:
pros.common.logger(__name__).exception(e)
Expand Down

0 comments on commit aa2ec85

Please sign in to comment.