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:
istasi 2014-07-05 12:37:43 +02:00
parent 495d083dd9
commit 9c587bd317

View File

@ -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