fix: prefer to run preload in cwd first

pull/59/head
sammy 2021-05-11 18:55:05 -04:00
parent 0ddfc5bea0
commit 630d7dde9c
No known key found for this signature in database
GPG Key ID: 50EE40A2809851F5
1 changed files with 2 additions and 2 deletions

4
lua.go
View File

@ -65,9 +65,9 @@ func LuaInit() {
.. os.getenv 'HOME' .. '/.local/share/hilbish/libs/?.lua'
`)
err := l.DoFile("/usr/share/hilbish/preload.lua")
err := l.DoFile("preload.lua")
if err != nil {
err = l.DoFile("preload.lua")
err = l.DoFile("/usr/share/hilbish/preload.lua")
if err != nil {
fmt.Fprintln(os.Stderr,
"Missing preload file, builtins may be missing.")