From e335ef599475d6a292f44cb6af785e1356751a6d Mon Sep 17 00:00:00 2001 From: sammyette Date: Sat, 20 Jul 2024 10:53:49 -0400 Subject: [PATCH] feat: add userDir module --- api.go | 4 ++-- lua.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api.go b/api.go index c3081a2..1aca72f 100644 --- a/api.go +++ b/api.go @@ -81,8 +81,8 @@ func hilbishLoader(mlr *moonlight.Runtime) moonlight.Value { //util.SetField(rtm, mod, "vimMode", rt.NilValue) // hilbish.userDir table - //hshuser := userDirLoader(rtm) - //mod.Set(rt.StringValue("userDir"), rt.TableValue(hshuser)) + hshuser := userDirLoader() + hshMod.SetField("userDir", moonlight.TableValue(hshuser)) // hilbish.os table //hshos := hshosLoader(rtm) diff --git a/lua.go b/lua.go index 3755f0e..901dceb 100644 --- a/lua.go +++ b/lua.go @@ -53,6 +53,7 @@ func luaInit() { // Add more paths that Lua can require from _, err := l.DoString("package.path = package.path .. " + requirePaths) 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.") }