Skip to content

Commit 3e9ccbe

Browse files
authored
Merge pull request #1088 from vvoland/fix-shell
tools/script_shell: Fix implicit all required parameters
2 parents 22f8914 + 94dc3f1 commit 3e9ccbe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/tools/builtin/script_shell.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func NewScriptShellTool(shellTools map[string]latest.ScriptShellToolConfig, env
3737
func validateConfig(toolName string, tool latest.ScriptShellToolConfig) error {
3838
// If no required array was set, all arguments are required
3939
if tool.Required == nil {
40-
tool.Required = make([]string, len(tool.Args))
40+
tool.Required = make([]string, 0, len(tool.Args))
4141
for argName := range tool.Args {
4242
tool.Required = append(tool.Required, argName)
4343
}

0 commit comments

Comments
 (0)