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