diff --git a/internal/shell/shell.go b/internal/shell/shell.go index 58e63fc245bfda708c87f9b39895705d3ee5d344..9798eaa8c417fc54e5d0213547f6c9b644f70600 100644 --- a/internal/shell/shell.go +++ b/internal/shell/shell.go @@ -156,9 +156,9 @@ func (s *Shell) SetBlockFuncs(blockFuncs []BlockFunc) { } // CommandsBlocker creates a BlockFunc that blocks exact command matches -func CommandsBlocker(bannedCommands []string) BlockFunc { +func CommandsBlocker(cmds []string) BlockFunc { bannedSet := make(map[string]struct{}) - for _, cmd := range bannedCommands { + for _, cmd := range cmds { bannedSet[cmd] = struct{}{} }