Skip to content

Fix: sys.exit(1) runs unconditionally due to indentation bug#458

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

Fix: sys.exit(1) runs unconditionally due to indentation bug#458
Jah-yee wants to merge 1 commit intomicrosoft:mainfrom
Jah-yee:fix/indentation-sys-exit

Conversation

@Jah-yee
Copy link

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

Summary

The sys.exit(1) was at the wrong indentation level (outside the except block), causing it to always run after the subprocess completes, even when the command succeeds.

This fix moves sys.exit(1) inside the except block so it only runs when subprocess.run raises a CalledProcessError.

Files Changed

  • setup_env.py (line 108): Fixed indentation
  • utils/e2e_benchmark.py (line 23): Fixed indentation

Related Issue

Fixes issue #447

The sys.exit(1) was at the wrong indentation level (outside the
except block), causing it to always run after the subprocess completes,
even when the command succeeds.

This fix moves sys.exit(1) inside the except block so it only runs
when subprocess.run raises a CalledProcessError.

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