mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Set environment before calling which
Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
@@ -14,7 +14,7 @@ steps:
|
||||
export GIT_SSL_CAINFO="$(python -m certifi)"
|
||||
export LANG="C.UTF-8"
|
||||
export PIP_PROCESS_DEPENDENCY_LINKS="1"
|
||||
echo "Path: $PATH"
|
||||
echo "Path $PATH"
|
||||
echo "Installing Pipenv…"
|
||||
pip install -e "$(pwd)" --upgrade
|
||||
pipenv install --deploy --dev
|
||||
|
||||
@@ -8,7 +8,9 @@ steps:
|
||||
# https://bugs.python.org/issue18199
|
||||
subst T: "$env:TEMP"
|
||||
Write-Host "##vso[task.setvariable variable=TEMP]T:\"
|
||||
$env:TEMP='T:\'
|
||||
Write-Host "##vso[task.setvariable variable=TMP]T:\"
|
||||
$env:TEMP='T:\'
|
||||
Get-ChildItem Env:
|
||||
D:\.venv\Scripts\pipenv run pytest -n 4 -ra --ignore=pipenv\patched --ignore=pipenv\vendor --junitxml=test-results.xml tests
|
||||
displayName: Run integration tests
|
||||
|
||||
+4
-1
@@ -1520,6 +1520,10 @@ def which_pip(allow_global=False):
|
||||
def system_which(command, mult=False):
|
||||
"""Emulates the system's which. Returns None if not found."""
|
||||
_which = "which -a" if not os.name == "nt" else "where"
|
||||
os.environ = {
|
||||
vistir.compat.fs_str(k): vistir.compat.fs_str(val)
|
||||
for k, val in os.environ.items()
|
||||
}
|
||||
c = delegator.run("{0} {1}".format(_which, command))
|
||||
try:
|
||||
# Which Not found…
|
||||
@@ -2223,7 +2227,6 @@ def _launch_windows_subprocess(script):
|
||||
|
||||
|
||||
def do_run_nt(script):
|
||||
os.environ = {k: vistir.compat.fs_str(val) for k, val in os.environ.items()}
|
||||
p = _launch_windows_subprocess(script)
|
||||
p.communicate()
|
||||
sys.exit(p.returncode)
|
||||
|
||||
Reference in New Issue
Block a user