Commit 49a7a868 by Sébastien Eustace

Fix the new command

parent 1a53c5e4
import sys
from cleo import argument from cleo import argument
from cleo import option from cleo import option
...@@ -18,7 +20,7 @@ class NewCommand(Command): ...@@ -18,7 +20,7 @@ class NewCommand(Command):
def handle(self): def handle(self):
from poetry.layouts import layout from poetry.layouts import layout
from poetry.utils._compat import Path from poetry.utils._compat import Path
from poetry.utils.env import EnvManager from poetry.utils.env import SystemEnv
from poetry.vcs.git import GitConfig from poetry.vcs.git import GitConfig
if self.option("src"): if self.option("src"):
...@@ -49,7 +51,7 @@ class NewCommand(Command): ...@@ -49,7 +51,7 @@ class NewCommand(Command):
if author_email: if author_email:
author += " <{}>".format(author_email) author += " <{}>".format(author_email)
current_env = EnvManager().get(Path.cwd()) current_env = SystemEnv(Path(sys.executable))
default_python = "^{}".format( default_python = "^{}".format(
".".join(str(v) for v in current_env.version_info[:2]) ".".join(str(v) for v in current_env.version_info[:2])
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment