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
Alexandru Croitor
minicoin
Commits
32abb0e1
Commit
32abb0e1
authored
Mar 13, 2022
by
Volker Hilsheimer
Browse files
Fix interpreting run parameters
parent
2794db13
Changes
1
Hide whitespace changes
Inline
Side-by-side
minicoin/lib/plugins/commands/run.rb
View file @
32abb0e1
...
...
@@ -82,13 +82,12 @@ module Minicoin
def
initialize
(
argv
,
env
)
@argv
,
@job_name
,
@job_args
=
split_main_and_subcommand
(
argv
)
# special case, since we have a main command argument that takes a value
[
"--repeat"
,
"--jobconfig"
,
"--env"
,
"--provider"
].
each
do
|
option
|
if
@argv
[
-
1
]
==
option
loop
do
@argv
<<
@job_name
@job_name
=
@job_args
.
delete_at
(
0
)
break
unless
@job_name
.
start_with?
(
"-"
)
end
special_params
=
[
"--repeat"
,
"--jobconfig"
,
"--env"
,
"--provider"
]
while
special_params
.
include?
(
@argv
[
-
1
])
loop
do
@argv
<<
@job_name
@job_name
=
@job_args
.
delete_at
(
0
)
break
unless
@job_name
.
start_with?
(
"-"
)
end
end
super
(
@argv
,
env
)
...
...
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