Skip to content

Commit

Permalink
Issue crc-org#961 Podman remote currently not working on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
gbraad committed Mar 6, 2020
1 parent aa3b038 commit 1b937c6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/crc/cmd/podman_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"github.com/code-ready/crc/pkg/crc/errors"
"github.com/code-ready/crc/pkg/crc/machine"
"github.com/code-ready/crc/pkg/crc/output"
crcos "github.com/code-ready/crc/pkg/os"
"github.com/code-ready/crc/pkg/os/shell"
"github.com/spf13/cobra"
)
Expand All @@ -14,6 +15,12 @@ var podmanEnvCmd = &cobra.Command{
Short: "Setup podman environment",
Long: `Setup environment for 'podman' binary to access podman on CRC VM`,
Run: func(cmd *cobra.Command, args []string) {

// See issue #961; Currently does not work on Windows in combination with the CRC vm.
if crcos.CurrentOS() == crcos.WINDOWS {
errors.ExitWithMessage(1, "Currently not supported on this platform.")
}

userShell, err := shell.GetShell(forceShell)
if err != nil {
errors.ExitWithMessage(1, "Error running the podman-env command: %s", err.Error())
Expand Down
8 changes: 8 additions & 0 deletions pkg/crc/preflight/preflight_checks_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/code-ready/crc/pkg/crc/oc"
"github.com/code-ready/crc/pkg/crc/podman"
"github.com/code-ready/crc/pkg/embed"
crcos "github.com/code-ready/crc/pkg/os"
)

var genericPreflightChecks = [...]PreflightCheck{
Expand Down Expand Up @@ -80,6 +81,13 @@ func fixOcBinaryCached() error {

// Check if podman binary is cached or not
func checkPodmanBinaryCached() error {

// See issue #961; Currently does not work on Windows in combination with the CRC vm.
if crcos.CurrentOS() == crcos.WINDOWS {
logging.Debug("podman remote currently not supported on this platform")
return nil
}

podman := podman.PodmanCached{}
if !podman.IsCached() {
return errors.New("podman remote binary is not cached")
Expand Down

0 comments on commit 1b937c6

Please sign in to comment.