// Copyright (c) 2022 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"github.com/sirupsen/logrus"8"github.com/spf13/cobra"910"github.com/gitpod-io/gitpod/previewctl/pkg/preview"11)1213func newSSHPreviewCmd(logger *logrus.Logger) *cobra.Command {14cmd := &cobra.Command{15Use: "ssh",16Short: "SSH into a preview's Virtual Machine.",17RunE: func(cmd *cobra.Command, args []string) error {18err := preview.SSHPreview(branch)19if err != nil {20logger.WithFields(logrus.Fields{"err": err}).Fatal("Failed to SSH preview's VM.")21}2223return err24},25}2627return cmd28}293031