-
Notifications
You must be signed in to change notification settings - Fork 568
/
main.go
31 lines (28 loc) · 877 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
package main
import (
"fmt"
"os"
"strings"
"github.com/pachyderm/pachyderm/v2/src/internal/errors"
"github.com/pachyderm/pachyderm/v2/src/internal/log"
"github.com/pachyderm/pachyderm/v2/src/internal/tracing"
"github.com/pachyderm/pachyderm/v2/src/server/cmd/mount-server/cmd"
"github.com/spf13/pflag"
)
func main() {
// Remove kubernetes client flags from the spf13 flag set
// (we link the kubernetes client, so otherwise they're in 'pachctl --help')
pflag.CommandLine = pflag.NewFlagSet(os.Args[0], pflag.ExitOnError)
log.InitPachctlLogger()
tracing.InstallJaegerTracerFromEnv()
err := func() error {
defer tracing.CloseAndReportTraces()
return errors.EnsureStack(cmd.MountServerCmd().Execute())
}()
if err != nil {
if errString := strings.TrimSpace(err.Error()); errString != "" {
fmt.Fprintf(os.Stderr, "%s\n", errString)
}
os.Exit(1)
}
}