From 41010caa8cab9a1fc386db5ab6cf436c6b49fb7a Mon Sep 17 00:00:00 2001 From: Clint Modien Date: Mon, 10 Feb 2020 13:26:15 -0800 Subject: [PATCH] fixes #668 - Path based dev-dependencies break 'install --no-dev' when the directory does not exist --- poetry/factory.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/poetry/factory.py b/poetry/factory.py index 90c9cec3295..ce02b3c64be 100644 --- a/poetry/factory.py +++ b/poetry/factory.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals import shutil +import sys from typing import Dict from typing import List @@ -98,7 +99,7 @@ def create_poetry( package.add_dependency(name, constraint) - if "dev-dependencies" in local_config: + if "dev-dependencies" in local_config and not "--no-dev" in sys.argv: for name, constraint in local_config["dev-dependencies"].items(): if isinstance(constraint, list): for _constraint in constraint: