diff --git a/docs/cli.md b/docs/cli.md index dc25f441040..fdd0705d2fd 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -1086,8 +1086,7 @@ poetry self lock #### Options -* `--check`: Verify that `poetry.lock` is consistent with `pyproject.toml`. (**Deprecated**) -* `--no-update`: Do not update locked versions, only refresh lock file. +* `--regenerate`: Ignore existing lock file and overwrite it with a new lock file created from scratch. ### self show diff --git a/src/poetry/console/commands/check.py b/src/poetry/console/commands/check.py index d6b6517d616..120f78d4295 100644 --- a/src/poetry/console/commands/check.py +++ b/src/poetry/console/commands/check.py @@ -158,7 +158,7 @@ def handle(self) -> int: if self.poetry.locker.is_locked() and not self.poetry.locker.is_fresh(): check_result["errors"] += [ "pyproject.toml changed significantly since poetry.lock was last generated. " - "Run `poetry lock [--no-update]` to fix the lock file." + "Run `poetry lock` to fix the lock file." ] if not check_result["errors"] and not check_result["warnings"]: diff --git a/src/poetry/installation/installer.py b/src/poetry/installation/installer.py index 8a243e15b45..c51a7db04bf 100644 --- a/src/poetry/installation/installer.py +++ b/src/poetry/installation/installer.py @@ -257,7 +257,7 @@ def _do_install(self) -> int: if not self._locker.is_fresh(): raise ValueError( "pyproject.toml changed significantly since poetry.lock was last" - " generated. Run `poetry lock [--no-update]` to fix the lock file." + " generated. Run `poetry lock` to fix the lock file." ) if not (reresolve or self._locker.is_locked_groups_and_markers()): if self._io.is_verbose(): diff --git a/tests/console/commands/test_check.py b/tests/console/commands/test_check.py index ed71d7f60e6..ff6c87d5693 100644 --- a/tests/console/commands/test_check.py +++ b/tests/console/commands/test_check.py @@ -258,7 +258,7 @@ def test_check_lock_outdated( status_code = tester.execute(options) expected = ( "Error: pyproject.toml changed significantly since poetry.lock was last generated. " - "Run `poetry lock [--no-update]` to fix the lock file.\n" + "Run `poetry lock` to fix the lock file.\n" ) assert tester.io.fetch_error() == expected diff --git a/tests/installation/test_installer.py b/tests/installation/test_installer.py index a8e3b726c36..e813ac171e0 100644 --- a/tests/installation/test_installer.py +++ b/tests/installation/test_installer.py @@ -240,7 +240,7 @@ def test_not_fresh_lock(installer: Installer, locker: Locker) -> None: ValueError, match=re.escape( "pyproject.toml changed significantly since poetry.lock was last generated. " - "Run `poetry lock [--no-update]` to fix the lock file." + "Run `poetry lock` to fix the lock file." ), ): installer.run() diff --git a/tests/packages/test_locker.py b/tests/packages/test_locker.py index 798d2731042..d5ef0764330 100644 --- a/tests/packages/test_locker.py +++ b/tests/packages/test_locker.py @@ -526,7 +526,7 @@ def test_locker_properly_assigns_metadata_files(locker: Locker) -> None: For multiple constraints dependencies, there is only one common entry in metadata.files. However, we must not assign all the files to each of the packages because this can result in duplicated and outdated entries when running - `poetry lock --no-update` and hash check failures when running `poetry install`. + `poetry lock` and hash check failures when running `poetry install`. """ content = """\ [[package]]