Skip to content

confusing error message for uv lock --check #14105

Open
@RmStorm

Description

@RmStorm

Summary

When running uv lock --check the error message for an out of date lock file is a bit confusing:

uv lock --check
Resolved 288 packages in 1.77s
error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`.

It says --locked was provided but it obviously wasn't.. --check was!

Given the docs here the message is somewhat understandable I guess?

You can check if the lockfile is up-to-date by passing the --check flag to uv lock:
uv lock --check
This is equivalent to the --locked flag for other commands.

Even though the error message makes some sense given the context of the docs I feel like a better error message should be provided.

Platform

Linux 5.15.0-141-generic x86_64 GNU/Linux

Version

uv 0.7.3

Python version

Python 3.12.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingerror messagesMessaging when something goes wronghelp wantedContribution especially encouraged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions