Skip to content

Commit 6720290

Browse files
committed
publish: emit non-interactive dist warning on stdout
1 parent 2ef4634 commit 6720290

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/poetry/console/commands/publish.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def handle(self) -> int:
8282
return 1
8383

8484
if not self.io.is_interactive():
85-
self.line_error(
85+
self.line(
8686
"<warning>Warning: Existing distribution files were found in "
8787
f"{dist_dir}; continuing because --no-interaction was set.</warning>"
8888
)

tests/console/commands/test_publish.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,6 @@ def test_publish_build_no_interaction_skips_confirmation(
242242
assert (
243243
"Warning: Existing distribution files were found in dist; continuing because"
244244
" --no-interaction was set."
245-
) in error
245+
) in output
246246
command_call.assert_called_once_with("build", args="--output dist")
247247
assert publisher_publish.call_count == 1

0 commit comments

Comments
 (0)