Fix params not being passed to scripts
This commit is contained in:
parent
ad9517b81d
commit
d854751f82
|
@ -1351,6 +1351,7 @@ class Core
|
|||
response_timeout = 15
|
||||
search_term = nil
|
||||
session_name = nil
|
||||
has_script_arguments = false
|
||||
|
||||
# any arguments that don't correspond to an option or option arg will
|
||||
# be put in here
|
||||
|
@ -1362,6 +1363,8 @@ class Core
|
|||
else
|
||||
# Parse the command options
|
||||
@@sessions_opts.parse(args) do |opt, idx, val|
|
||||
next if has_script_arguments
|
||||
|
||||
case opt
|
||||
when "-q", "--quiet"
|
||||
quiet = true
|
||||
|
@ -1398,6 +1401,9 @@ class Core
|
|||
unless script
|
||||
method = 'script'
|
||||
script = val
|
||||
# Assume any parameter after the script name is a flag/argument we want to pass to the script itself.
|
||||
extra += args[(idx + 1)..-1]
|
||||
has_script_arguments = true
|
||||
end
|
||||
# Upload and exec to the specific command session
|
||||
when "-u", "--upgrade"
|
||||
|
|
Loading…
Reference in New Issue