From 08db22eaf1d7a85788e9a35b2651f044c0e70cfa Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 10 Feb 2014 12:29:28 -0500 Subject: Improved compatibility of experimental winapi `os.execute()`; core/file_io.lua --- core/file_io.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/file_io.lua b/core/file_io.lua index 73b70f3f..257eb5ef 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -460,7 +460,8 @@ if WIN32 then return file end os.execute = function(prog) + if not prog then return true end -- shell is available local code = winapi.execute(prog) - if code then return code == 0 and true or nil, 'exit', code end + return code == 0 and true or nil, 'exit', code end end -- cgit v1.2.3