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
4897a70e
Unverified
Commit
4897a70e
authored
Jan 31, 2020
by
Sébastien Eustace
Committed by
GitHub
Jan 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix errors when using the --help option (#1910)
parent
930515b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
+11
-1
poetry/console/config/application_config.py
+11
-1
No files found.
poetry/console/config/application_config.py
View file @
4897a70e
...
@@ -9,6 +9,7 @@ from clikit.api.event import PRE_HANDLE
...
@@ -9,6 +9,7 @@ from clikit.api.event import PRE_HANDLE
from
clikit.api.event
import
PreHandleEvent
from
clikit.api.event
import
PreHandleEvent
from
clikit.api.event
import
PreResolveEvent
from
clikit.api.event
import
PreResolveEvent
from
clikit.api.event.event_dispatcher
import
EventDispatcher
from
clikit.api.event.event_dispatcher
import
EventDispatcher
from
clikit.api.exceptions
import
CliKitException
from
clikit.api.formatter
import
Style
from
clikit.api.formatter
import
Style
from
clikit.api.io
import
Input
from
clikit.api.io
import
Input
from
clikit.api.io
import
InputStream
from
clikit.api.io
import
InputStream
...
@@ -101,7 +102,16 @@ class ApplicationConfig(BaseApplicationConfig):
...
@@ -101,7 +102,16 @@ class ApplicationConfig(BaseApplicationConfig):
if
args
.
has_option_token
(
"-h"
)
or
args
.
has_option_token
(
"--help"
):
if
args
.
has_option_token
(
"-h"
)
or
args
.
has_option_token
(
"--help"
):
from
clikit.api.resolver
import
ResolvedCommand
from
clikit.api.resolver
import
ResolvedCommand
resolved_command
=
self
.
command_resolver
.
resolve
(
args
,
application
)
try
:
resolved_command
=
self
.
command_resolver
.
resolve
(
args
,
application
)
except
CliKitException
:
# We weren't able to resolve the command,
# due to a parse error most likely,
# so we fall back on the default behavior
return
super
(
ApplicationConfig
,
self
)
.
resolve_help_command
(
event
,
event_name
,
dispatcher
)
# If the current command is the run one, skip option
# If the current command is the run one, skip option
# check and interpret them as part of the executed command
# check and interpret them as part of the executed command
if
resolved_command
.
command
.
name
==
"run"
:
if
resolved_command
.
command
.
name
==
"run"
:
...
...
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