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

Executor: Remove duplicate entry with dry-run argument #4660

Merged
merged 7 commits into from Aug 24, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/poetry/installation/executor.py
Expand Up @@ -311,8 +311,6 @@ def _do_execute_operation(self, operation: Operation) -> int:
return 0

if not self._enabled or self._dry_run:
self._io.write_line(f" <fg=blue;options=bold>•</> {operation_message}")

return 0

result: int = getattr(self, f"_execute_{method}")(operation)
Expand Down Expand Up @@ -700,7 +698,9 @@ def _download_archive(self, operation: Install | Update, link: Link) -> Path:
return archive

def _should_write_operation(self, operation: Operation) -> bool:
return not operation.skipped or self._dry_run or self._verbose
return (
not operation.skipped or self._dry_run or self._verbose or not self._enabled
)

def _save_url_reference(self, operation: Operation) -> None:
"""
Expand Down
1 change: 0 additions & 1 deletion tests/console/commands/self/test_remove_plugins.py
Expand Up @@ -95,7 +95,6 @@ def test_remove_installed_package_dry_run(tester: CommandTester):

Package operations: 0 installs, 0 updates, 1 removal, 1 skipped

• Removing poetry-plugin (1.2.3)
• Removing poetry-plugin (1.2.3)
• Installing poetry ({__version__}): Skipped for the following reason: Already \
installed
Expand Down