Skip to content

Commit 4f26386

Browse files
committed
http(fix): check arguments on client
We _need_ to do this before calling PreRun but it's also nice to do this before bothering the server.
1 parent 1adb804 commit 4f26386

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

http/client.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ func NewClient(address string, opts ...ClientOpt) Client {
6969
func (c *client) Execute(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment) error {
7070
cmd := req.Command
7171

72+
err := cmd.CheckArguments(req)
73+
if err != nil {
74+
return err
75+
}
76+
7277
if cmd.PreRun != nil {
7378
err := cmd.PreRun(req, env)
7479
if err != nil {

0 commit comments

Comments
 (0)