mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
fix system which
This commit is contained in:
+2
-2
@@ -1615,7 +1615,7 @@ def system_which(command, mult=False):
|
||||
})
|
||||
result = None
|
||||
try:
|
||||
c = subprocess_run([_which, command])
|
||||
c = subprocess_run(f"{_which} {command}", shell=True)
|
||||
try:
|
||||
# Which Not found...
|
||||
if c.returncode == 127:
|
||||
@@ -1634,7 +1634,7 @@ def system_which(command, mult=False):
|
||||
result = fallback_which(command, allow_global=True)
|
||||
else:
|
||||
if not result:
|
||||
result = next(iter([c.out, c.err]), "").split("\n")
|
||||
result = next(iter([c.stdout, c.stderr]), "").split("\n")
|
||||
result = next(iter(result)) if not mult else result
|
||||
return result
|
||||
if not result:
|
||||
|
||||
Reference in New Issue
Block a user