Skip to content

Commit 2d68e82

Browse files
dvrkpsodeke-em
authored andcommitted
gotip: fix panic for no arguments
Fixes: golang/go#39099 Change-Id: If89740a3913f489b058af177b340dde82c0738e9 Reviewed-on: https://go-review.googlesource.com/c/dl/+/234158 Reviewed-by: Emmanuel Odeke <[email protected]> Run-TryBot: Emmanuel Odeke <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 2a78748 commit 2d68e82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gotip/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func main() {
3737
log.Fatalf("gotip: %v", err)
3838
}
3939

40-
if os.Args[1] == "download" {
40+
if len(os.Args) > 1 && os.Args[1] == "download" {
4141
switch len(os.Args) {
4242
case 2:
4343
if err := installTip(root, ""); err != nil {

0 commit comments

Comments
 (0)