Skip to content

Missing user feedback for why publish was aborted when --no-interaction is set #351

Open
@mstandley-tempus

Description

@mstandley-tempus

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement of an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions