fix env pass in sh command. closes #3196

This commit is contained in:
payonel 2022-06-08 23:10:49 -07:00
parent 6aee1d645f
commit c9530ae0dd
2 changed files with 3 additions and 3 deletions

View File

@ -41,5 +41,5 @@ if #args == 0 then
end
else
-- execute command.
return sh.execute(...)
return sh.execute(_ENV, ...)
end

View File

@ -10,8 +10,8 @@ function shell.execute(command, env, ...)
if not sh then
return false, reason
end
local proc = process.load(sh, nil, nil, command)
local result = table.pack(process.internal.continue(proc, env, command, ...))
local proc = process.load(sh, env, nil, command)
local result = table.pack(process.internal.continue(proc, command, ...))
if result.n == 0 then return true end
return table.unpack(result, 1, result.n)
end