Skip to content

Commit ccf9fac

Browse files
fix: use importlib.metadata to check garak version in container
pip freeze shows git-installed packages as URL refs, not ==version. Use Python's importlib.metadata.version() instead to get the actual installed version for comparison. Made-with: Cursor
1 parent c43a516 commit ccf9fac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/validate-deps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
- name: Verify garak version matches pyproject.toml
107107
run: |
108108
EXPECTED=$(grep -oP 'garak==\K[^\s"]+' pyproject.toml)
109-
INSTALLED=$(docker run --rm provider-smoke-test:ci pip freeze | grep -i '^garak==' | cut -d'=' -f3)
109+
INSTALLED=$(docker run --rm provider-smoke-test:ci python -c "from importlib.metadata import version; print(version('garak'))")
110110
echo "Expected: $EXPECTED"
111111
echo "Installed: $INSTALLED"
112112
if [ "$EXPECTED" != "$INSTALLED" ]; then

0 commit comments

Comments
 (0)