Skip to content

Commit ddd0cda

Browse files
committed
fix: remove command argument length validation
- Remove length validation for command arguments - Remove unused "errors" import Signed-off-by: wecoding <wecoding@yeah.net>
1 parent ecbbaee commit ddd0cda

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

internal/cli/exec/exec.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package exec
22

33
import (
4-
"errors"
54
"path/filepath"
65
"strings"
76

@@ -34,10 +33,6 @@ func NewCmdExec(ioStreams genericclioptions.IOStreams, cfg *options.Config) *cob
3433
Short: "Use AI to interpret your instruction and execute the shell command",
3534
Args: cobra.ArbitraryArgs,
3635
RunE: func(cmd *cobra.Command, args []string) error {
37-
if len(args) == 0 {
38-
return errors.New("no command provided to execute")
39-
}
40-
4136
input := strings.TrimSpace(strings.Join(args, " "))
4237

4338
// Delegate to coder's /exec subcommand via AutoCoder

0 commit comments

Comments
 (0)