Skip to content
GitLab
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
5463868a
Commit
5463868a
authored
May 30, 2018
by
Theophile GENTILHOMME
Browse files
[scripts][main_cli] Add --editor option
parent
e5daae32
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/cmdline/scripts/main_cli.py
View file @
5463868a
...
...
@@ -38,9 +38,13 @@ logging.Logger.extra = _extra
type
=
click
.
STRING
)
@
click
.
option
(
'-m'
,
'--platform'
,
help
=
'The URL of the BEAT platform to '
'access.'
,
type
=
click
.
STRING
)
@
click
.
option
(
'-e'
,
'--editor'
,
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
)
@
verbosity_option
()
@
click
.
pass_context
def
main
(
ctx
,
test_mode
,
version
,
prefix
,
cache
,
user
,
token
,
platform
):
def
main
(
ctx
,
test_mode
,
version
,
prefix
,
cache
,
user
,
token
,
platform
,
editor
):
"""The main command line interface for beat cmdline. Look below for available
commands."""
...
...
@@ -50,6 +54,7 @@ def main(ctx, test_mode, version, prefix, cache, user, token, platform):
ctx
.
meta
[
'--user'
]
=
user
ctx
.
meta
[
'--token'
]
=
token
ctx
.
meta
[
'--platform'
]
=
platform
ctx
.
meta
[
'--editor'
]
=
editor
# Check that we are in a BEAT working folder
config
=
Configuration
(
ctx
.
meta
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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