From b1f7f47bbc983b037eab370ec27f2e8b226bea88 Mon Sep 17 00:00:00 2001 From: Cesar Lizarraga Date: Fri, 2 Aug 2024 17:05:30 -0500 Subject: [PATCH] Fix 180: Make subprocess commands proper lists --- src/python_inspector/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python_inspector/api.py b/src/python_inspector/api.py index d49fe55..b318745 100644 --- a/src/python_inspector/api.py +++ b/src/python_inspector/api.py @@ -73,8 +73,8 @@ def to_dict(self, generic_paths=False): } def pip_conf_get_index_urls() -> list: - pip_index_url_cmd = "pip config get global.index-url" - pip_extra_index_url_cmd = "pip config get global.extra-index-url" + pip_index_url_cmd = ["pip", "config", "get", "global.index-url"] + pip_extra_index_url_cmd = ["pip", "config", "get", "global.extra-index-url"] index_urls = subprocess.run(pip_index_url_cmd, capture_output=True) if index_urls.returncode != 0: index_urls = []