Commit ee9b8000 by Grey Baker Committed by Sébastien Eustace

Add a --lock option to poetry update (#389)

parent b546a1b3
...@@ -364,6 +364,8 @@ poetry update requests toml ...@@ -364,6 +364,8 @@ poetry update requests toml
#### Options #### Options
* `--dry-run` : Outputs the operations but will not execute anything (implicitly enables --verbose). * `--dry-run` : Outputs the operations but will not execute anything (implicitly enables --verbose).
* `--no-dev` : Do not install dev dependencies.
* `--lock` : Do not perform install (only update the lockfile).
### add ### add
......
...@@ -149,6 +149,8 @@ poetry update requests toml ...@@ -149,6 +149,8 @@ poetry update requests toml
### Options ### Options
* `--dry-run` : Outputs the operations but will not execute anything (implicitly enables --verbose). * `--dry-run` : Outputs the operations but will not execute anything (implicitly enables --verbose).
* `--no-dev` : Do not install dev dependencies.
* `--lock` : Do not perform install (only update the lockfile).
## add ## add
......
...@@ -10,6 +10,7 @@ class UpdateCommand(EnvCommand): ...@@ -10,6 +10,7 @@ class UpdateCommand(EnvCommand):
{ --no-dev : Do not install dev dependencies. } { --no-dev : Do not install dev dependencies. }
{ --dry-run : Outputs the operations but will not execute anything { --dry-run : Outputs the operations but will not execute anything
(implicitly enables --verbose). } (implicitly enables --verbose). }
{ --lock : Do not perform install (only update the lockfile). }
""" """
_loggers = ["poetry.repositories.pypi_repository"] _loggers = ["poetry.repositories.pypi_repository"]
...@@ -32,6 +33,7 @@ class UpdateCommand(EnvCommand): ...@@ -32,6 +33,7 @@ class UpdateCommand(EnvCommand):
installer.dev_mode(not self.option("no-dev")) installer.dev_mode(not self.option("no-dev"))
installer.dry_run(self.option("dry-run")) installer.dry_run(self.option("dry-run"))
installer.execute_operations(not self.option("lock"))
# Force update # Force update
installer.update(True) installer.update(True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment