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

Fix --optional option in add command

parent a2f9aec5
Loading
Loading
Loading
Loading
+1 −0
Changes for CHANGELOG.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@

- Fixed Python version retrieval inside virtualenvs.
- Fixed optional dependencies being set as required in sdist.
- Fixed `--optional` option in the `add` command not being used.


## [0.6.3] - 2018-03-20
+6 −0
Changes for poetry/console/commands/add.py: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -53,6 +53,12 @@ If you do not specify a version constraint, poetry will choose a suitable one ba
            parser.parse_constraints(constraint)

        for name, constraint in requirements.items():
            if self.option('optional'):
                constraint = {
                    'version': constraint,
                    'optional': True
                }

            poetry_content[section][name] = constraint

        # Write new content