Description
When trying to run poetry publish
on one of our projects with --no-interaction
set, we see that the build fails with the error Aborted!
and no additional information about why.
It turns out that our build script runs poetry build
prior to poetry publish --build
. Because of this, we hit this condition in poetry: https://github.com/python-poetry/poetry/blob/2b16b2fcf15da2a69e118a637ab4ee4fcb6a234c/src/poetry/console/commands/publish.py#L60
When we remove --no-interaction
we see the message There are 2 files ready for publishing. Build anyway? (yes/no) [no]
as expected.
It would have been nice if this message had been visible in our CI system's logs in the first place. Instead of suppressing the user prompt completely, can we print the question and append something on the end to indicate that we're selecting the default option because we are running non-interactively? E.g.,:
There are 2 files ready for publishing. Build anyway? (yes/no) [no]
WARNING: --no-interaction is set. Choosing the default answer!
Aborted!
Alternatively, change the error message Aborted!
to something more descriptive.
Activity