Update process.lua

This commit is contained in:
Robert Jelic
2023-01-08 10:04:00 +01:00
committed by GitHub
parent a4d0492d17
commit 94fccf9211

View File

@@ -17,7 +17,6 @@ function process:new(path, window, newEnv, ...)
local env = setmetatable(newEnv, {__index=_ENV})
env.shell = shell
env.basaltProgram=true
env.arg = {[0]=path, table.unpack(args)}
env.require, env.package = newPackage(env, fs.getDir(pPath))
if(fs.exists(pPath))then
local file = fs.open(pPath, "r")
@@ -25,7 +24,7 @@ function process:new(path, window, newEnv, ...)
file.close()
local program = load(content, path, "bt", env)
if(program~=nil)then
return program()
return program(table.unpack(args))
end
end
end)
@@ -82,4 +81,4 @@ function process:start()
coroutine.resume(self.coroutine)
end
return process
return process