Skip to content

Commit efe6d19

Browse files
author
FirstUnicorn
committed
fix: remove invalid --no-update flag from poetry lock command
The --no-update flag doesn't exist in poetry lock command. Also added support for PEP 621 format in validation.
1 parent aaf20c3 commit efe6d19

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/validate-dependencies.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ jobs:
6969
pkg_toml = os.path.join(path, 'pyproject.toml')
7070
if os.path.exists(pkg_toml):
7171
pkg_config = toml.load(pkg_toml)
72-
actual_name = pkg_config.get('tool', {}).get('poetry', {}).get('name')
72+
# Try PEP 621 format first, fall back to Poetry
73+
actual_name = pkg_config.get('project', {}).get('name')
74+
if not actual_name:
75+
actual_name = pkg_config.get('tool', {}).get('poetry', {}).get('name')
76+
7377
if actual_name and actual_name != pkg_name:
7478
errors.append(
7579
f"Name mismatch: dependency key '{pkg_name}' but "
@@ -120,7 +124,7 @@ jobs:
120124
cp poetry.lock poetry.lock.original
121125
122126
echo "Regenerating lock file..."
123-
poetry lock --no-update
127+
poetry lock
124128
125129
echo "Comparing files..."
126130
if ! diff -q poetry.lock.original poetry.lock; then

0 commit comments

Comments
 (0)