Skip to content

Commit

Permalink
feat: add --lock option to remove command
Browse files Browse the repository at this point in the history
  • Loading branch information
ralbertazzi committed May 13, 2023
1 parent 3bed8d6 commit 966b635
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/poetry/console/commands/remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class RemoveCommand(InstallerCommand):
"(implicitly enables --verbose)."
),
),
option("lock", None, "Do not perform operations (only update the lockfile)."),
]

help = """The <info>remove</info> command removes a package from the current
Expand Down Expand Up @@ -117,6 +118,7 @@ def handle(self) -> int:
self.installer.dry_run(self.option("dry-run", False))
self.installer.verbose(self.io.is_verbose())
self.installer.update(True)
self.installer.execute_operations(not self.option("lock"))
self.installer.whitelist(removed_set)

status = self.installer.run()
Expand Down

0 comments on commit 966b635

Please sign in to comment.