Skip to content

Commit

Permalink
Ignore if self candidate doesn't exist
Browse files Browse the repository at this point in the history
Fix #126
  • Loading branch information
frostming committed Jun 24, 2020
1 parent 765f602 commit 6476bb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/126.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug that `pdm export` fails when the project doesn't have `name` property.
2 changes: 1 addition & 1 deletion pdm/cli/commands/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def handle(self, project: Project, options: argparse.Namespace) -> None:
if options.default:
# Don't include self candidate
temp = project.get_locked_candidates()
temp.pop(project.meta.name)
temp.pop(project.meta.name, None)
candidates.extend(temp.values())
if options.dev:
candidates.extend(project.get_locked_candidates("dev").values())
Expand Down

0 comments on commit 6476bb4

Please sign in to comment.