Skip to content

Commit c5faf01

Browse files
committed
[Python] Pass the executable not all the remaining args
1 parent 00c16c2 commit c5faf01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dep/dep.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -545,15 +545,15 @@ def verify(self):
545545
"""Verify the packages in pip match this dependency."""
546546

547547
try:
548-
pip_version = subprocess.check_output([sys.argv[1:], "-m", "pip", "--version"]).decode("utf-8")
548+
pip_version = subprocess.check_output([sys.executable, "-m", "pip", "--version"]).decode("utf-8")
549549
pip_tokens = pip_version.split()
550550
assert pip_tokens[0] == "pip"
551551
pip_version = Version(pip_tokens[1])
552552

553553
if pip_version < Version("9.0.0"):
554554
raise MissingDependencyError(self, "Version of pip too old.")
555555

556-
pip_package_config = json.loads(subprocess.check_output([sys.argv[1:],
556+
pip_package_config = json.loads(subprocess.check_output([sys.executable,
557557
"-m",
558558
"pip",
559559
"list",

0 commit comments

Comments
 (0)