Path: blob/main/components/ws-daemon/cmd/content-initializer.go
2498 views
// Copyright (c) 2020 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"os"89"github.com/spf13/cobra"1011"github.com/gitpod-io/gitpod/ws-daemon/pkg/content"12)1314// contentInitializerCmd creates a workspace snapshot15var contentInitializerCmd = &cobra.Command{16Use: "content-initializer",17Short: "fork'ed by ws-daemon to initialize content",18Args: cobra.ExactArgs(0),19RunE: func(cmd *cobra.Command, args []string) error {2021statsFd := os.NewFile(content.RUN_INITIALIZER_CHILD_STATS_FD, "stats")2223err := content.RunInitializerChild(statsFd)24if err != nil {25return err26}2728return nil29},30}3132func init() {33clientCmd.AddCommand(contentInitializerCmd)34}353637