Skip to content

Config errors sometimes result in exit code 0 #19548

@wyattscarpenter

Description

@wyattscarpenter

Several tests in cmdline.pyproject.test result in configuration errors, yet assert == Return code: 0. This is probably bad; they should probably give a return code of 2, for use error. See, for more information, #6003 (because apparently it isn't documented yet). See also #16764, which may be related.

Originally noted by @sterliakov in #19494 (comment), who also had this to say:

I really think this should be fixed, 2 sounds reasonable and consistent with other tools, most Unix tools do that (grep --wtf and ls --not-an-option do exit with 2 on my system, for example, and bad config file is semantically close to bad flags). Note that mypy --wtf also exits with 2, so we have a precedent, and ruff exits with 2 if it finds an unknown key in its pyproject.toml section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy