Skip to content

fix: move sys.exit(1) inside except block in run_command()#457

Open
Jah-yee wants to merge 2 commits intomicrosoft:mainfrom
Jah-yee:fix-sys-exit-indent-v2
Open

fix: move sys.exit(1) inside except block in run_command()#457
Jah-yee wants to merge 2 commits intomicrosoft:mainfrom
Jah-yee:fix-sys-exit-indent-v2

Conversation

@Jah-yee
Copy link

@Jah-yee Jah-yee commented Mar 13, 2026

The sys.exit(1) was at the same indentation as try:, causing it to run unconditionally after subprocess completes - even on success.

This bug exists in two files:

  • setup_env.py line 107
  • utils/e2e_benchmark.py line 23

Fixes #447

Jah-yee and others added 2 commits March 13, 2026 15:44
In setup_env.py (line 107) and utils/e2e_benchmark.py (line 23), the
sys.exit(1) was at the same indentation level as 'try', causing it to
run unconditionally after subprocess completes - even when the command
succeeds. This moves sys.exit(1) inside the except block where it
belongs.

Fixes: microsoft#447
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sys.exit(1) runs unconditionally due to indentation bug in run_command()

1 participant