fix(ci): avoid unbound module variable in purity check
Some checks failed
CICD Start / Sanity and Base Decision (pull_request) Failing after 11m34s
Some checks failed
CICD Start / Sanity and Base Decision (pull_request) Failing after 11m34s
Keep module expansion inside the container shell when probing Python imports, preventing set -u from failing in the host script.
This commit is contained in:
@@ -157,7 +157,7 @@ if [ -z "$PYTHON_BIN" ]; then
|
||||
fi
|
||||
|
||||
for module in ${MODULES}; do
|
||||
if "$PYTHON_BIN" -c "import importlib.util,sys; sys.exit(0 if importlib.util.find_spec('${module}') else 1)" >/dev/null 2>&1; then
|
||||
if "$PYTHON_BIN" -c "import importlib.util,sys; sys.exit(0 if importlib.util.find_spec(\"$module\") else 1)" >/dev/null 2>&1; then
|
||||
printf "%s\n" "$module"
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user