mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 03:05:30 -04:00
Adds support for the environment variable _
http://istasi.dk/printenv.png yes, this clearly editted, due to my heighten paranoid level
This commit is contained in:
parent
495d083dd9
commit
9c587bd317
@ -118,7 +118,9 @@ local function execute(env, command, ...)
|
||||
local thread, reason = process.load(shell.resolve(program, "lua"), env, nil, command)
|
||||
if not thread then
|
||||
return false, reason
|
||||
end
|
||||
else
|
||||
os.setenv ( '_', shell.resolve (program, "lua") )
|
||||
end
|
||||
local result = nil
|
||||
-- Emulate CC behavior by making yields a filtered event.pull()
|
||||
while args[1] and coroutine.status(thread) ~= "dead" do
|
||||
@ -189,4 +191,4 @@ else
|
||||
error(result[2], 0)
|
||||
end
|
||||
return table.unpack(result, 2)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user