Skip to content

Commit acfa7e9

Browse files
committed
feat(plugin): add fast exit option to Application.exit method
1 parent eaa7e14 commit acfa7e9

File tree

2 files changed

+6
-3
lines changed
  • packages

2 files changed

+6
-3
lines changed

packages/analyze/src/robotcode/analyze/code/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ def code(
427427

428428
app.echo(statistics_str)
429429

430-
app.exit(result_collector.calculate_return_code().value)
430+
app.exit(result_collector.calculate_return_code().value, fast=True)
431431

432432
except (TypeError, ValueError) as e:
433433
raise click.ClickException(str(e)) from e

packages/plugin/src/robotcode/plugin/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,12 @@ def keyboard_interrupt(self) -> None:
335335
self.verbose("Aborted!", file=sys.stderr)
336336
sys.exit(253)
337337

338-
def exit(self, code: int = 0) -> None:
338+
def exit(self, code: int = 0, fast: bool = False) -> None:
339339
self.verbose(f"Exit with code {code}")
340-
sys.exit(code)
340+
if fast:
341+
os._exit(code)
342+
else:
343+
sys.exit(code)
341344

342345
@contextmanager
343346
def chdir(self, path: Union[str, Path, None]) -> Iterator[Optional[Path]]:

0 commit comments

Comments
 (0)