Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure current Python interpreter is used for subprocesses #898

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

akx
Copy link
Contributor

@akx akx commented Mar 23, 2023

One spot used python, the other used python3sys.executable is known to be correct.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 23, 2023
@akx
Copy link
Contributor Author

akx commented Mar 23, 2023

How can the tests fail (in CI, not locally!) with

Traceback (most recent call last):
  File "/home/runner/work/LibCST/LibCST/libcst/codemod/tests/test_codemod_cli.py", line 23, in test_codemod_formatter_error_input
    sys.executable,
NameError: name 'sys' is not defined

when

import subprocess
import sys

@zsol
Copy link
Member

zsol commented Mar 24, 2023

Looks like you'll need to rebase this pr, it's based on a commit from 2020

@akx
Copy link
Contributor Author

akx commented Mar 24, 2023

Looks like you'll need to rebase this pr, it's based on a commit from 2020

Note to self: check where your origin/master points at before branching off it.

@zsol
Copy link
Member

zsol commented Mar 24, 2023

To be fair, github doesn't exactly make this obvious

@zsol
Copy link
Member

zsol commented Mar 27, 2023

Thanks!

@zsol zsol merged commit ae42dee into Instagram:main Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants