print the arguments to be executed
This commit is contained in:
parent
305dbd2fdf
commit
498a4d0975
|
@ -150,6 +150,8 @@ this.create_clip = function(clip_type, on_complete)
|
|||
end
|
||||
end)()
|
||||
|
||||
print("The following args will be executed:", table.concat(h.quote_if_necessary(args), " ") )
|
||||
|
||||
local output_dir_path = utils.split_path(output_file_path)
|
||||
local location_info = utils.file_info(output_dir_path)
|
||||
if not location_info.is_dir then
|
||||
|
|
12
helpers.lua
12
helpers.lua
|
@ -83,4 +83,16 @@ this.human_readable_time = function(seconds)
|
|||
return ret
|
||||
end
|
||||
|
||||
this.quote_if_necessary = function(args)
|
||||
local ret = {}
|
||||
for _, v in ipairs(args) do
|
||||
if v:find(" ") then
|
||||
table.insert(ret, (v:find("'") and string.format('"%s"', v) or string.format("'%s'", v)))
|
||||
else
|
||||
table.insert(ret, v)
|
||||
end
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
return this
|
||||
|
|
Loading…
Reference in a new issue