feat: add userDir module

midnight-edition
sammyette 2024-07-20 10:53:49 -04:00
parent 56045ed236
commit e335ef5994
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
2 changed files with 3 additions and 2 deletions

4
api.go
View File

@ -81,8 +81,8 @@ func hilbishLoader(mlr *moonlight.Runtime) moonlight.Value {
//util.SetField(rtm, mod, "vimMode", rt.NilValue) //util.SetField(rtm, mod, "vimMode", rt.NilValue)
// hilbish.userDir table // hilbish.userDir table
//hshuser := userDirLoader(rtm) hshuser := userDirLoader()
//mod.Set(rt.StringValue("userDir"), rt.TableValue(hshuser)) hshMod.SetField("userDir", moonlight.TableValue(hshuser))
// hilbish.os table // hilbish.os table
//hshos := hshosLoader(rtm) //hshos := hshosLoader(rtm)

1
lua.go
View File

@ -53,6 +53,7 @@ func luaInit() {
// Add more paths that Lua can require from // Add more paths that Lua can require from
_, err := l.DoString("package.path = package.path .. " + requirePaths) _, err := l.DoString("package.path = package.path .. " + requirePaths)
if err != nil { if err != nil {
fmt.Fprintln(os.Stderr, err)
fmt.Fprintln(os.Stderr, "Could not add Hilbish require paths! Libraries will be missing. This shouldn't happen.") fmt.Fprintln(os.Stderr, "Could not add Hilbish require paths! Libraries will be missing. This shouldn't happen.")
} }