2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-11 08:03:22 +00:00

feat: run lua in sh interp exec handler

This commit is contained in:
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

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)