Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Removing dev dependency uninstall the project as well #2162

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/2150.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug that removing dev dependency uninstalls the project as well.
2 changes: 1 addition & 1 deletion src/pdm/cli/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def do_sync(
clean=clean,
dry_run=dry_run,
no_editable=no_editable,
install_self=not no_self and "default" in selection and bool(project.name),
install_self=not no_self and bool(project.name),
reinstall=reinstall,
only_keep=only_keep,
fail_fast=fail_fast,
Expand Down
2 changes: 1 addition & 1 deletion src/pdm/cli/commands/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def do_add(
project,
selection=GroupSelection(project, groups=[group], default=False),
no_editable=no_editable and tracked_names,
no_self=no_self,
no_self=no_self or group != "default",
requirements=list(group_deps.values()),
dry_run=dry_run,
fail_fast=fail_fast,
Expand Down