Unverified Commit 6f7da285 authored by Sébastien Eustace's avatar Sébastien Eustace
Browse files

Fix add command for package with dots

parent aef45e20
Loading
Loading
Loading
Loading
+5 −0
Changes for poetry/console/commands/add.py: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
import re

import toml

from typing import List
from typing import Tuple

@@ -64,6 +66,9 @@ If you do not specify a version constraint, poetry will choose a suitable one ba
        if index is not None:
            for i, require in enumerate(requirements.items()):
                name, version = require
                if '.' in name:
                    name = f'"{name}"'

                content.insert(
                    index + i,
                    f'{name} = "{version}"'