Skip to content

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

Open
Jah-yee wants to merge 1 commit intomicrosoft:mainfrom
Jah-yee:fix/indentation-sys-exit-bug
Open

fix: move sys.exit(1) inside except block in run_command()#456
Jah-yee wants to merge 1 commit intomicrosoft:mainfrom
Jah-yee:fix/indentation-sys-exit-bug

Conversation

@Jah-yee
Copy link

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

The sys.exit(1) was at the same indentation as the try block, causing it to run unconditionally after subprocess completes - even when the command succeeds. This fix moves sys.exit(1) inside the except block so it only runs on subprocess failure.

Affected files:

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

Fixes issue #447

The sys.exit(1) was at the same indentation as the try block, causing it
to run unconditionally after subprocess completes - even when the command
succeeds. This fix moves sys.exit(1) inside the except block so it only
runs on subprocess failure.

Affected files:
- setup_env.py (line 107)
- utils/e2e_benchmark.py (line 23)

Fixes issue 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.

1 participant