Skip to content

Request: Allow --output-file, --annotation-style, etc. multiple times, only use right-most #3248

@AndydeCleyre

Description

@AndydeCleyre

requirements.in:

requests
$ uv pip compile requirements.in -o reqs1.txt -o reqs2.txt
error: the argument '--output-file <OUTPUT_FILE>' cannot be used multiple times
$ uv --version
uv 0.1.37
$ uname
Linux

I'm requesting that instead, the above command write output to (only) reqs2.txt, the latest instance of -o/--output-file on the command line. This is useful when using shell aliases or functions to wrap uv, when you specify a "default" output file in the alias or function, while allowing any invocation to easily override that default by specifying the option again, on the command line.

That's how pip-tools behaves, and I make use of that behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliRelated to the command line interface

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions