mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 06:46:15 +00:00
Remove forcing CI code path to use nt shell code path (#6072)
* Remove forcing CI code path to use nt shell code path and remove outdated comment * Add news fragment
This commit is contained in:
@@ -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.
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user