Skip to content

Commit 5c70fd8

Browse files
committed
chore: disable ga
1 parent e197ab6 commit 5c70fd8

File tree

2 files changed

+5
-117
lines changed

2 files changed

+5
-117
lines changed

starport/cmd/starport/analytics.go

Lines changed: 0 additions & 87 deletions
This file was deleted.

starport/cmd/starport/main.go

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,29 @@ import (
44
"context"
55
"errors"
66
"fmt"
7-
"os"
87

98
starportcmd "github.com/tendermint/starport/starport/cmd"
109
"github.com/tendermint/starport/starport/pkg/clictx"
11-
"github.com/tendermint/starport/starport/pkg/gacli"
1210
"github.com/tendermint/starport/starport/pkg/validation"
1311
)
1412

1513
func main() {
16-
defer func() {
17-
if r := recover(); r != nil {
18-
addMetric(Metric{
19-
Err: fmt.Errorf("%v", r),
20-
})
21-
fmt.Println(r)
22-
os.Exit(1)
23-
}
24-
}()
25-
gaclient = gacli.New(gaid)
26-
name, hadLogin := prepLoginName()
27-
if !hadLogin {
28-
addMetric(Metric{
29-
Login: name,
30-
IsInstallation: true,
31-
})
32-
}
33-
// if running serve command, don't wait sending metric until the end of
34-
// execution because it takes a long time.
35-
if len(os.Args) > 1 && os.Args[1] == "serve" {
36-
addMetric(Metric{})
37-
}
38-
3914
ctx := clictx.From(context.Background())
15+
4016
err := starportcmd.New().ExecuteContext(ctx)
4117

4218
if err == context.Canceled {
43-
addMetric(Metric{
44-
Err: err,
45-
})
4619
fmt.Println("aborted")
4720
return
4821
}
22+
4923
if err != nil {
5024
var validationErr validation.Error
25+
5126
if errors.As(err, &validationErr) {
5227
panic(validationErr.ValidationInfo())
53-
} else {
54-
panic(err)
5528
}
29+
30+
panic(err)
5631
}
5732
}

0 commit comments

Comments
 (0)