Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
eb4b45d7
Commit
eb4b45d7
authored
Oct 15, 2022
by
finswimmer
Committed by
Bjorn Neergaard
Nov 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(cli): interpret --directory option for `init` as target folder
parent
544b4a14
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
+11
-1
src/poetry/console/commands/init.py
+11
-1
No files found.
src/poetry/console/commands/init.py
View file @
eb4b45d7
...
...
@@ -77,7 +77,17 @@ The <c1>init</c1> command creates a basic <comment>pyproject.toml</> file in the
from
poetry.layouts
import
layout
from
poetry.utils.env
import
SystemEnv
pyproject
=
PyProjectTOML
(
Path
.
cwd
()
/
"pyproject.toml"
)
project_path
=
Path
.
cwd
()
if
self
.
io
.
input
.
option
(
"directory"
):
project_path
=
Path
(
self
.
io
.
input
.
option
(
"directory"
))
if
not
project_path
.
exists
()
or
not
project_path
.
is_dir
():
self
.
line_error
(
"<error>The --directory path is not a directory.</error>"
)
return
1
pyproject
=
PyProjectTOML
(
project_path
/
"pyproject.toml"
)
if
pyproject
.
file
.
exists
():
if
pyproject
.
is_poetry_project
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment