Update process.lua
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user