Skip to content

Commit 3922fb9

Browse files
att
1 parent 26feea4 commit 3922fb9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/base_flags.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ end
2020

2121

2222
luargv.get_flag_args = function(flags)
23+
if luargv.type(flags) == "string" then
24+
flags = { flags }
25+
end
26+
2327
local args_size = luargv.get_total_args_size()
2428
local founds = {}
2529
local founds_size = 0
@@ -62,6 +66,9 @@ luargv.flags_exist = function(flags)
6266
end
6367

6468
luargv.get_first_flag_value_or_default = function(flags, default)
69+
if luargv.type(flags) == "string" then
70+
flags = { flags }
71+
end
6572
local flags, size = luargv.get_flag_args(flags)
6673
if size == 0 then
6774
return default

0 commit comments

Comments
 (0)