fix: initialize lua api before handling signals (fixes #236)

job-suspend
sammyette 2023-02-01 19:56:27 -04:00
parent f97a04179d
commit e2cf417144
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 3 additions and 1 deletions

View File

@ -115,9 +115,11 @@ func main() {
os.Setenv("SHELL", os.Args[0]) os.Setenv("SHELL", os.Args[0])
} }
go handleSignals()
lr = newLineReader("", false) lr = newLineReader("", false)
luaInit() luaInit()
go handleSignals()
// If user's config doesn't exixt, // If user's config doesn't exixt,
if _, err := os.Stat(defaultConfPath); os.IsNotExist(err) && *configflag == defaultConfPath { if _, err := os.Stat(defaultConfPath); os.IsNotExist(err) && *configflag == defaultConfPath {
// Read default from current directory // Read default from current directory