You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
Additionally, when --no-interaction is unset, if our CI system encounters this situation, it hangs forever, and the prompt never shows up in the console logs, even after aborting the build. This is what prompted us to start using --no-interaction in the first place.
I also have this issue.
I would expect the --no-interaction to be equivalent to typing 'yes' at the user prompt. Obviously it doesn't make sense to not use the --no-interaction flag in a CI system; that's what it's for.
It's possible that a more explicit flag like -y, similar to how apt-get -y install works could be clearer than --no-interaction in this case.
For me, I solved this by removing the build files before running publish with the --build option. Assuming the default dist directory:
+1 on this issue. Removing the dist/ dir certainly works, but it's pretty frustrating. It would be better to have an option to build only if build artifacts don't already exist.
When trying to run
poetry publish
on one of our projects with--no-interaction
set, we see that the build fails with the errorAborted!
and no additional information about why.It turns out that our build script runs
poetry build
prior topoetry 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#L60When we remove
--no-interaction
we see the messageThere 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.,:
Alternatively, change the error message
Aborted!
to something more descriptive.The text was updated successfully, but these errors were encountered: