Skip to content

Commit 3a27d63

Browse files
committed
Fix error management for downloadtool
1 parent cbe605e commit 3a27d63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hub.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,11 @@ func checkCmd(m []byte) {
195195
var tool, toolVersion, behaviour string
196196
toolVersion = "latest"
197197
behaviour = "keep"
198-
if len(args) < 1 {
198+
if len(args) <= 1 {
199199
mapD := map[string]string{"DownloadStatus": "Error", "Msg": "Not enough arguments"}
200200
mapB, _ := json.Marshal(mapD)
201201
h.broadcastSys <- mapB
202+
return
202203
}
203204
if len(args) > 1 {
204205
tool = args[1]

0 commit comments

Comments
 (0)