Skip to content

Commit

Permalink
Executor: Remove duplicate entry with dry-run argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Macchia committed Oct 20, 2021
1 parent 82459bd commit 73b6da5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 3 additions & 7 deletions poetry/installation/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,6 @@ def _do_execute_operation(self, operation: "OperationTypes") -> int:
return 0

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

return 0

result = getattr(self, f"_execute_{method}")(operation)
Expand Down Expand Up @@ -737,7 +731,9 @@ def _download_archive(self, operation: Union[Install, Update], link: Link) -> Pa
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: "OperationTypes") -> None:
"""
Expand Down
1 change: 0 additions & 1 deletion tests/console/commands/plugin/test_remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ def test_remove_installed_package_dry_run(app, tester, env):
Package operations: 0 installs, 0 updates, 1 removal
• Removing poetry-plugin (1.2.3)
• Removing poetry-plugin (1.2.3)
"""

assert tester.io.fetch_output() == expected
Expand Down

0 comments on commit 73b6da5

Please sign in to comment.