Skip to content

Commit

Permalink
fix: try loading preload in current directory
Browse files Browse the repository at this point in the history
  • Loading branch information
TorchedSammy committed Mar 21, 2021
1 parent aecf098 commit b27b656
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"layeh.com/gopher-luar"
)

const version = "0.0.11"
const version = "0.0.12"
var l *lua.LState
var prompt string
var commands = map[string]bool{}
Expand Down Expand Up @@ -177,7 +177,11 @@ func LuaInit() {

err := l.DoFile("/usr/share/hilbish/preload.lua")
if err != nil {
fmt.Fprintln(os.Stderr, "Missing preload file, builtins may be missing.")
err = l.DoFile("preload.lua")
if err != nil {
fmt.Fprintln(os.Stderr,
"Missing preload file, builtins may be missing.")
}
}

homedir, _ := os.UserHomeDir()
Expand Down

0 comments on commit b27b656

Please sign in to comment.