Skip to content

Commit

Permalink
fix(cli): don't show a stack trace when command + c of the CLI (#2390)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Apr 3, 2024
1 parent 66ddfee commit ac6e957
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions playwright/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@


def main() -> None:
driver_executable, driver_cli = compute_driver_executable()
completed_process = subprocess.run(
[driver_executable, driver_cli, *sys.argv[1:]], env=get_driver_env()
)
sys.exit(completed_process.returncode)
try:
driver_executable, driver_cli = compute_driver_executable()
completed_process = subprocess.run(
[driver_executable, driver_cli, *sys.argv[1:]], env=get_driver_env()
)
sys.exit(completed_process.returncode)
except KeyboardInterrupt:
sys.exit(130)


if __name__ == "__main__":
Expand Down

0 comments on commit ac6e957

Please sign in to comment.