diff --git a/type/__package_pip/explorer/state b/type/__package_pip/explorer/state index ee3527024..52bc5054e 100755 --- a/type/__package_pip/explorer/state +++ b/type/__package_pip/explorer/state @@ -43,11 +43,41 @@ test -n "${pyinterp}" || { } # Execute the matching Python interpreter of pip. -pip_python() { eval set -- "${pyinterp}" '"$@"'; "$@"; } +# shellcheck disable=SC2120 +pip_python() { eval "set -- \"${pyinterp}\" \"\$@"\"; "$@"; } -requirement=$("${__type_explorer:?}/requirement") +REQUIREMENT=$("${__type_explorer:?}/requirement") +export REQUIREMENT -pip_python -c '__import__("pkg_resources").require(__import__("sys").argv[1])' \ - "${requirement}" >/dev/null 2>&1 \ -&& echo present \ -|| echo absent +pip_python <