MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / cliLuaEnv

Function cliLuaEnv

Source/Basic/Application.cpp:199–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199int cliLuaEnv(lua_State* L) {
200 auto name = cliGetString(L, 1);
201 if (auto value = std::getenv(name.c_str())) {
202 lua_pushstring(L, value);
203 } else if (lua_gettop(L) >= 2) {
204 lua_pushvalue(L, 2);
205 } else {
206 lua_pushnil(L);
207 }
208 return 1;
209}
210
211int cliLuaAbsolute(lua_State* L) {
212 auto path = fs::path(cliGetString(L, 1));

Callers

nothing calls this directly

Calls 7

cliGetStringFunction · 0.85
getenvFunction · 0.85
lua_pushstringFunction · 0.50
lua_gettopFunction · 0.50
lua_pushvalueFunction · 0.50
lua_pushnilFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected