Path: blob/main/components/image-builder-bob/cmd/root.go
2498 views
// Copyright (c) 2021 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34package cmd56import (7"fmt"8"os"9"time"1011log "github.com/gitpod-io/gitpod/common-go/log"12"github.com/sirupsen/logrus"13"github.com/spf13/cobra"14)1516// rootCmd represents the base command when called without any subcommands17var rootCmd = &cobra.Command{18Use: "bob",19Short: "Bob is the in-workspace component of the image builder. You should never have to interact with it directly.",20}2122// Execute runs the root command23func Execute() {24log.Init("bob", "", true, false)25if err := rootCmd.Execute(); err != nil {26fmt.Println(err)2728if log.Log.Logger.IsLevelEnabled(logrus.DebugLevel) {29time.Sleep(1 * time.Minute)30}3132os.Exit(1)33}34}3536func init() {37}383940