mirror of https://github.com/Hilbis/Hilbish
feat: add command.not-executable hook (closes #119)
parent
20a4cdb505
commit
8b5dc69950
1
exec.go
1
exec.go
|
@ -142,6 +142,7 @@ func execCommand(cmd, old string) error {
|
||||||
err := lookpath(args[0])
|
err := lookpath(args[0])
|
||||||
if err == errNotExec {
|
if err == errNotExec {
|
||||||
hooks.Em.Emit("command.no-perm", args[0])
|
hooks.Em.Emit("command.no-perm", args[0])
|
||||||
|
hooks.Em.Emit("command.not-executable", args[0])
|
||||||
return interp.NewExitStatus(126)
|
return interp.NewExitStatus(126)
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
hooks.Em.Emit("command.not-found", args[0])
|
hooks.Em.Emit("command.not-found", args[0])
|
||||||
|
|
Loading…
Reference in New Issue