Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.

Update pyproject.py #65

Merged
merged 3 commits into from Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "poetryup"
version = "0.12.0"
version = "0.12.1"
description = "Update dependencies and bump their version in the pyproject.toml file"
authors = ["Mousa Zeid Baker"]
packages = [
Expand Down
4 changes: 2 additions & 2 deletions src/poetryup/core/pyproject.py
Expand Up @@ -341,7 +341,7 @@ def __get_poetry_version() -> str:

output = cmd_run(["poetry", "--version"], capture_output=True)
# output is: 'Poetry version x.y.z'
return output.rsplit(" ", 1).pop().strip()
return output.rsplit(" ", 1).pop().strip().replace(")", "")

@staticmethod
def __run_poetry_show() -> str:
Expand Down Expand Up @@ -376,6 +376,6 @@ def __run_poetry_add(
elif group == "dev" and self.poetry_version < version_.parse("1.2.0"):
cmd_run(["poetry", "add", *packages, f"--{group}"])
elif self.poetry_version >= version_.parse("1.2.0"):
cmd_run(["poetry", "add", *packages, f"--group {group}"])
cmd_run(["poetry", "add", *packages, "--group", group])
else:
logging.warning(f"Couldn't add package(s) '{packages}'")