Skip to content

Commit

Permalink
Fix rich click for make compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
mayankpatibandla committed Feb 6, 2024
1 parent 4efc0c0 commit 9c0fb52
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pros/cli/build.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import ctypes
import sys
from typing import *

import click
Expand All @@ -24,6 +26,10 @@ def make(project: c.Project, build_args):
analytics.send("make")
exit_code = project.compile(build_args)
if exit_code != 0:
if sys.platform == 'win32':
kernel32 = ctypes.windll.kernel32
kernel32.SetConsoleMode(kernel32.GetStdHandle(-11), 7)

logger(__name__).error(f'Failed to make project: Exit Code {exit_code}', extra={'sentry': False})
raise click.ClickException('Failed to build')
return exit_code
Expand Down

0 comments on commit 9c0fb52

Please sign in to comment.