aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrumeet <17158086+Trumeet@users.noreply.github.com>2019-10-05 07:37:56 -0700
committerTrumeet <17158086+Trumeet@users.noreply.github.com>2019-10-05 07:37:56 -0700
commite2d9d48ce07b272faec5dccba4ae23725b75d2d1 (patch)
treef566703d636bc70c1ccfb30676ed92f3998f7fc3
parentbc68dff2130a610c64662acc99ca17f97f77530d (diff)
downloadPortableVM-e2d9d48ce07b272faec5dccba4ae23725b75d2d1.tar
PortableVM-e2d9d48ce07b272faec5dccba4ae23725b75d2d1.tar.gz
PortableVM-e2d9d48ce07b272faec5dccba4ae23725b75d2d1.tar.bz2
PortableVM-e2d9d48ce07b272faec5dccba4ae23725b75d2d1.zip
feat: support LuaJIT
-rw-r--r--Utils.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/Utils.lua b/Utils.lua
index 27a38a9..415231c 100644
--- a/Utils.lua
+++ b/Utils.lua
@@ -3,7 +3,13 @@ function Utils.exec(command)
if os.getenv("DEBUG") == "1" then
print("(Debug) Execute " .. command .. " (Status only)")
end
- return os.execute(command)
+ local result = os.execute(command)
+ if type(result) == "boolean" then
+ return result
+ -- For LuaJIT
+ elseif type(result) == "number" then
+ return result == 0
+ end
end
function Utils.exec2(command)
if os.getenv("DEBUG") == "1" then