[Tarantool-patches] [PATCH v2 1/2] luarocks: Add a kludge for option all of luarocks search

Leonid Vasiliev lvasiliev at tarantool.org
Mon Mar 16 15:01:35 MSK 2020



On 3/16/20 2:50 PM, Leonid Vasiliev wrote:
> From: Leonid <lvasiliev at tarantool.org>
> 
> Fixed the tarantoolctl rocks search flag --all
> 
> Forwarding of the --all flag to tarantoolctl rocks module was added.
> (Command: tarantoolctl rocks search --all)
> 
> Fixes: #4529
> ---
>   extra/dist/tarantoolctl.in | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
> index 6daf866ac..372838edd 100755
> --- a/extra/dist/tarantoolctl.in
> +++ b/extra/dist/tarantoolctl.in
> @@ -937,6 +937,7 @@ local function rocks()
>       local util = require("luarocks.util")
>       local command_line = require("luarocks.cmd")
>       local options = keyword_arguments
> +
>       local key = nil
>       if options["only-server"] ~= nil then
>           key = find_arg("only%-server")
> @@ -945,6 +946,10 @@ local function rocks()
>       end
>       table.insert(positional_arguments, key)
>   
> +    if positional_arguments[1] == "search" and find_arg("all") then
> +        table.insert(positional_arguments, "--all")
> +    end
> +
>       -- Tweak help messages
>       util.see_help = function(command, program)
>           -- TODO: print extended help message here
> @@ -1400,6 +1405,7 @@ local function populate_arguments()
>           { 'only-server', 'string'  },
>           { 'server',      'string'  },
>           { 'language',    'string'  },
> +        { 'all',         'boolean' },
>       })
>   
>       local cmd_name
>
diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in
index c6c3ecb8f..2b95e2957 100755
--- a/extra/dist/tarantoolctl.in
+++ b/extra/dist/tarantoolctl.in
@@ -937,7 +937,6 @@ local function rocks()
      local util = require("luarocks.util")
      local command_line = require("luarocks.cmd")
      local options = keyword_arguments
-
      local key = nil
      if options["only-server"] ~= nil then
          key = find_arg("only%-server")


More information about the Tarantool-patches mailing list