feat: run lua in sh interp exec handler

pull/59/head
sammyette 2021-05-19 18:38:15 -04:00
parent 9f1ad83c51
commit d4a595d2a8
No known key found for this signature in database
GPG Key ID: 50EE40A2809851F5
1 changed files with 5 additions and 0 deletions

View File

@ -122,6 +122,11 @@ func execCommand(cmd string) error {
return interp.NewExitStatus(exitcode)
}
err := l.DoString(argstring)
if err == nil {
return nil
}
if _, err := interp.LookPathDir(hc.Dir, hc.Env, args[0]); err != nil {
hooks.Em.Emit("command.not-found", args[0])
return interp.NewExitStatus(127)