Skip to content

poetry should fail when it can't upload a dist #920

@cjw296

Description

@cjw296
  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: See below

  • Poetry version: See below

Issue

See this build log:
https://circleci.com/gh/cjw296/carthorse/26

Even though it failed to upload the wheel, poetry returns a zero return code.

I can reproduce this locally too:

$ poetry publish --build
Building carthorse (0.1.0)
 - Building sdist
 - Built carthorse-0.1.0.tar.gz

 - Building wheel
 - Built carthorse-0.1.0-py2.py3-none-any.whl

Publishing carthorse (0.1.0) to PyPI
 - Uploading carthorse-0.1.0-py2.py3-none-any.whl 100%
                                                                                                                             
[HTTPError]                                                                                                   
400 Client Error: File already exists. See https://pypi.org/help/#file-name-reuse for url: https://upload.pypi.org/legacy  
/                                                                                                                          
                                                                                                                             
publish [-r|--repository REPOSITORY] [-u|--username USERNAME] [-p|--password PASSWORD] [--build]

$ echo $?
0

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/publishingRelated to PyPI/PEP 503 publishing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions