From ec96c0bed0fdb3df98c88fc6d559fa4e483fb912 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 14 Jul 2020 23:18:40 -0400 Subject: Renamed os.spawn() parameter from 'argv' to 'cmd'. There should be no confusion that it's a command line string, not a table of strings. --- core/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/init.lua') diff --git a/core/init.lua b/core/init.lua index 07c9e060..32e4090a 100644 --- a/core/init.lua +++ b/core/init.lua @@ -23,7 +23,7 @@ _M = {} -- language modules table -- pdcurses compatibility. if CURSES and WIN32 then - function os.spawn(argv, ...) + function os.spawn(cmd, ...) local cwd = lfs.currentdir() local args, i = {...}, 1 if type(args[i]) == 'string' then @@ -31,7 +31,7 @@ if CURSES and WIN32 then i = i + 1 end if type(args[i]) == 'table' then i = i + 1 end -- env (ignore) - local p = io.popen(assert_type(argv, 'string', 1) .. ' 2>&1') + local p = io.popen(assert_type(cmd, 'string', 1) .. ' 2>&1') if type(args[i]) == 'function' then args[i](p:read('a')) end -- stdout_cb local status = select(3, p:close()) if type(args[i + 2]) == 'function' then args[i + 2](status) end -- exit_cb -- cgit v1.2.3