diff --git a/news/6072.bugfix.rst b/news/6072.bugfix.rst new file mode 100644 index 00000000..a6210034 --- /dev/null +++ b/news/6072.bugfix.rst @@ -0,0 +1 @@ +Remove logic that treats ``CI`` variable to use ``do_run_nt`` shell logic, as the original reasons for that patch were no longer valid. diff --git a/pipenv/routines/shell.py b/pipenv/routines/shell.py index a4a4df62..1e8b286b 100644 --- a/pipenv/routines/shell.py +++ b/pipenv/routines/shell.py @@ -3,7 +3,6 @@ import subprocess import sys from os.path import expandvars -from pipenv import environments from pipenv.utils.project import ensure_project from pipenv.utils.shell import cmd_list_to_shell, system_which from pipenv.vendor import click @@ -99,9 +98,7 @@ def do_run(project, command, args, python=False, pypi_mirror=None): click.echo("Can't run script {0!r}-it's empty?", err=True) run_args = [project, script] run_kwargs = {"env": env} - # We're using `do_run_nt` on CI (even if we're running on a non-nt machine) - # as a workaround for https://github.com/pypa/pipenv/issues/4909. - if os.name == "nt" or environments.PIPENV_IS_CI: + if os.name == "nt": run_fn = do_run_nt else: run_fn = do_run_posix diff --git a/tests/conftest.py b/tests/conftest.py index 13778403..fc75b6b5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,14 +1,4 @@ import pytest -import os - -# Note that we have to do this *before* `pipenv.environments` gets imported, -# which is why we're doing it here as a side effect of importing this module. -# CI=1 is necessary as a workaround for https://github.com/pypa/pipenv/issues/4909 -os.environ['CI'] = '1' - -def pytest_sessionstart(session): - import pipenv.environments - assert pipenv.environments.PIPENV_IS_CI @pytest.fixture() diff --git a/tests/integration/test_run.py b/tests/integration/test_run.py index 0cb99d81..2b938aa9 100644 --- a/tests/integration/test_run.py +++ b/tests/integration/test_run.py @@ -41,8 +41,8 @@ multicommand = "bash -c \"cd docs && make html\"" c = p.pipenv('run notfoundscript') assert c.returncode != 0 assert c.stdout == '' - if os.name != 'nt': # TODO: Implement this message for Windows. - assert 'not found' in c.stderr + if os.name != 'nt': + assert 'could not be found' in c.stderr project = Project()