1
0
mirror of https://github.com/Adorable-Catgirl/LuaComp.git synced 2024-11-01 08:00:56 +11:00
LuaComp/src/shell_var.lua
2021-06-25 11:06:38 -05:00

17 lines
408 B
Lua

-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at https://mozilla.org/MPL/2.0/.
svar = {}
do
local stdlib = require("posix.stdlib")
function svar.get(var)
return os.getenv(var)
end
function svar.set(var, val)
return stdlib.setenv(var, val and tostring(val) or nil)
end
end