| 197 | } |
| 198 | |
| 199 | int 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 | |
| 211 | int cliLuaAbsolute(lua_State* L) { |
| 212 | auto path = fs::path(cliGetString(L, 1)); |
nothing calls this directly
no test coverage detected