package cmd
import (
"os"
"github.com/gitpod-io/gitpod/common-go/log"
"github.com/gitpod-io/gitpod/workspacekit/pkg/lift"
"github.com/spf13/cobra"
)
var liftCmd = &cobra.Command{
Use: "lift <command>",
Short: "runs a command in ring1",
Args: cobra.MinimumNArgs(1),
FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
Run: func(_ *cobra.Command, args []string) {
args = os.Args[2:]
err := lift.RunCommand(lift.DefaultSocketPath, args)
if err != nil {
log.WithError(err).Error("cannot lift command")
}
},
}
func init() {
rootCmd.AddCommand(liftCmd)
}