remove assert, original run with original args

This commit is contained in:
w-e-w 2025-03-01 00:17:31 +09:00
parent 7fd7fc67f7
commit 435b1df2db
No known key found for this signature in database
GPG Key ID: 52CFE43196F6280E

View File

@ -32,10 +32,8 @@ def patch():
else:
command = [arg.strip() for arg in command]
assert isinstance(command, list)
if "pip" not in command:
return subprocess.__original_run([*command, *_args], **_kwargs)
if not isinstance(command, list) or "pip" not in command:
return subprocess.__original_run(*args, **kwargs)
cmd = command[command.index("pip") + 1:]