forked from elastic/elastic-package
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
33 lines (25 loc) · 675 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
package main
import (
"log"
"math/rand"
"os"
"time"
"github.com/pkg/errors"
"github.com/elastic/elastic-package/cmd"
"github.com/elastic/elastic-package/internal/install"
)
func main() {
rand.Seed(time.Now().UnixNano())
rootCmd := cmd.RootCmd()
err := install.EnsureInstalled()
if err != nil {
log.Fatal(errors.Wrap(err, "validating installation failed"))
}
err = rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}