Skip to content

fix: use sys.executable for pytest runner python_path - #760

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/sys-executable-pytest-runner
Open

fix: use sys.executable for pytest runner python_path#760
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/sys-executable-pytest-runner

Conversation

@sentry

@sentry sentry Bot commented Aug 12, 2026

Copy link
Copy Markdown

This PR addresses a FileNotFoundError that occurred when the label-analysis command, utilizing the PytestStandardRunner, attempted to execute pytest via a subprocess. The root cause was the hardcoded default python_path of 'python' in PytestStandardRunnerConfigParams.

On systems where the python executable is not directly in the PATH (e.g., some macOS or Linux environments that primarily use python3), the subprocess call would fail. This fix changes the default python_path to sys.executable, ensuring that the pytest subprocess is always invoked using the same Python interpreter that is running the codecov-cli command. This makes the runner more robust and compatible across various environments.

Fixes CLI-G9

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.

0 participants