(l *State)
| 105 | } |
| 106 | |
| 107 | func noEnv(l *State) bool { |
| 108 | l.Field(RegistryIndex, "LUA_NOENV") |
| 109 | b := l.ToBoolean(-1) |
| 110 | l.Pop(1) |
| 111 | return b |
| 112 | } |
| 113 | |
| 114 | func setPath(l *State, field, env, def string) { |
| 115 | if path := os.Getenv(env); path == "" || noEnv(l) { |