Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.cmdline
Commits
1259da32
Commit
1259da32
authored
Jan 21, 2019
by
André Anjos
💬
Browse files
Merge branch 'issue_55_fix_version' into 'master'
Add version option Closes
#55
See merge request
!58
parents
b9ea7a5b
94e81120
Pipeline
#26172
passed with stages
in 8 minutes and 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beat/cmdline/scripts/main_cli.py
View file @
1259da32
...
...
@@ -23,7 +23,6 @@ logging.Logger.extra = _extra
@
click
.
group
(
cls
=
AliasedGroup
)
@
click
.
option
(
'-T'
,
'--test-mode'
,
help
=
'Assume test mode and doesn
\'
t setup '
'the logging module'
,
default
=
False
,
is_flag
=
True
)
@
click
.
option
(
'-V'
,
'--version'
,
help
=
'Show version'
,
is_flag
=
True
)
@
click
.
option
(
'-p'
,
'--prefix'
,
help
=
'Overrides the prefix of your local data. '
'If not set use the value from your RC file'
,
...
...
@@ -43,13 +42,13 @@ logging.Logger.extra = _extra
help
=
'Overrides the user editor to edit local files. If not '
'set, use the value from your environment. There are no '
'defaults for this option.'
,
type
=
click
.
STRING
)
@
click
.
version_option
()
@
verbosity_option
()
@
click
.
pass_context
def
main
(
ctx
,
test_mode
,
version
,
prefix
,
cache
,
user
,
token
,
platform
,
editor
):
def
main
(
ctx
,
test_mode
,
prefix
,
cache
,
user
,
token
,
platform
,
editor
):
"""The main command line interface for beat cmdline. Look below for available
commands."""
ctx
.
meta
[
'--version'
]
=
version
ctx
.
meta
[
'--prefix'
]
=
prefix
ctx
.
meta
[
'--cache'
]
=
cache
ctx
.
meta
[
'--user'
]
=
user
...
...
Write
Preview
Supports
Markdown
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