mirror of https://github.com/Hilbis/Hilbish
feat: run lua in sh interp exec handler
parent
9f1ad83c51
commit
d4a595d2a8
5
shell.go
5
shell.go
|
@ -122,6 +122,11 @@ func execCommand(cmd string) error {
|
||||||
return interp.NewExitStatus(exitcode)
|
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 {
|
if _, err := interp.LookPathDir(hc.Dir, hc.Env, args[0]); err != nil {
|
||||||
hooks.Em.Emit("command.not-found", args[0])
|
hooks.Em.Emit("command.not-found", args[0])
|
||||||
return interp.NewExitStatus(127)
|
return interp.NewExitStatus(127)
|
||||||
|
|
Loading…
Reference in New Issue