diff --git a/go.mod b/go.mod index f774fdae03..2bbe3b5504 100644 --- a/go.mod +++ b/go.mod @@ -108,7 +108,7 @@ replace ( github.com/Azure/go-autorest/autorest/azure/auth => github.com/tombuildsstuff/go-autorest/autorest/azure/auth v0.4.3-0.20200416184303-d4e299a3c04a github.com/coreos/go-systemd => github.com/coreos/go-systemd/v22 v22.0.0 // Pin non-versioned import to v22.0.0 github.com/go-log/log => github.com/go-log/log v0.1.1-0.20181211034820-a514cf01a3eb // Pinned by MCO - github.com/hashicorp/terraform => github.com/openshift/terraform v0.12.20-openshift-3 // Pin to fork with deduplicated rpc types + github.com/hashicorp/terraform => github.com/openshift/terraform v0.12.20-openshift-4 // Pin to fork with deduplicated rpc types v0.12.20-openshift-4 github.com/hashicorp/terraform-plugin-sdk => github.com/openshift/hashicorp-terraform-plugin-sdk v1.14.0-openshift // Pin to fork with public rpc types github.com/metal3-io/baremetal-operator => github.com/openshift/baremetal-operator v0.0.0-20200702005656-4ce920a36861 // Use OpenShift fork github.com/metal3-io/cluster-api-provider-baremetal => github.com/openshift/cluster-api-provider-baremetal v0.0.0-20190821174549-a2a477909c1d // Pin OpenShift fork diff --git a/go.sum b/go.sum index ce2c3e8e54..15957d9282 100644 --- a/go.sum +++ b/go.sum @@ -1466,8 +1466,8 @@ github.com/openshift/machine-config-operator v0.0.1-0.20200130220348-e5685c0cf53 github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII= github.com/openshift/prom-label-proxy v0.1.1-0.20191016113035-b8153a7f39f1/go.mod h1:p5MuxzsYP1JPsNGwtjtcgRHHlGziCJJfztff91nNixw= github.com/openshift/runtime-utils v0.0.0-20191011150825-9169de69ebf6/go.mod h1:5gDRVvQwesU7cfwlpuMivdv3Dz/oslvv2qTBHCy4wqQ= -github.com/openshift/terraform v0.12.20-openshift-3 h1:aA0Mn8+Jl4ZWIOh84FkR7y34AAxnBfOu8FT2VMwTjEQ= -github.com/openshift/terraform v0.12.20-openshift-3/go.mod h1:R/dUWEZVB5itR8fNzx3g8QZMIwwWuI8rcwF8SbL1sq4= +github.com/openshift/terraform v0.12.20-openshift-4 h1:1v7cIei84p26eqbD4LiTZOH0ecXbL7Qss0sy4BFeWhY= +github.com/openshift/terraform v0.12.20-openshift-4/go.mod h1:R/dUWEZVB5itR8fNzx3g8QZMIwwWuI8rcwF8SbL1sq4= github.com/openshift/terraform-provider-aws v1.60.1-0.20200630224953-76d1fb4e5699 h1:vDqnd5N3KG0NvPXOQ6iO5rWMJ/R7ccxtO3Tis1gZRYE= github.com/openshift/terraform-provider-aws v1.60.1-0.20200630224953-76d1fb4e5699/go.mod h1:0U3OgA2uDYSc7gNkdWA92+/BxWXwuYhWqqZ4UhM1RCw= github.com/openshift/terraform-provider-azurerm v1.40.1-0.20200707062554-97ea089cc12a h1:yrCt4MiDMfLRv//VnIc3lnrmBYhIIz72+ZcGq/YMIjk= diff --git a/vendor/github.com/hashicorp/terraform/helper/wrappedstreams/streams.go b/vendor/github.com/hashicorp/terraform/helper/wrappedstreams/streams.go index d3e5cf1c04..b661ed7321 100644 --- a/vendor/github.com/hashicorp/terraform/helper/wrappedstreams/streams.go +++ b/vendor/github.com/hashicorp/terraform/helper/wrappedstreams/streams.go @@ -10,34 +10,31 @@ import ( // Stdin returns the true stdin of the process. func Stdin() *os.File { - stdin := os.Stdin - if panicwrap.Wrapped(nil) { - stdin = wrappedStdin - } - + stdin, _, _ := fds() return stdin } // Stdout returns the true stdout of the process. func Stdout() *os.File { - stdout := os.Stdout - if panicwrap.Wrapped(nil) { - stdout = wrappedStdout - } - + _, stdout, _ := fds() return stdout } // Stderr returns the true stderr of the process. func Stderr() *os.File { - stderr := os.Stderr - if panicwrap.Wrapped(nil) { - stderr = wrappedStderr - } - + _, _, stderr := fds() return stderr } +func fds() (stdin, stdout, stderr *os.File) { + stdin, stdout, stderr = os.Stdin, os.Stdout, os.Stderr + if panicwrap.Wrapped(nil) { + initPlatform() + stdin, stdout, stderr = wrappedStdin, wrappedStdout, wrappedStderr + } + return +} + // These are the wrapped standard streams. These are setup by the // platform specific code in initPlatform. var ( @@ -45,8 +42,3 @@ var ( wrappedStdout *os.File wrappedStderr *os.File ) - -func init() { - // Initialize the platform-specific code - initPlatform() -} diff --git a/vendor/github.com/hashicorp/terraform/helper/wrappedstreams/streams_other.go b/vendor/github.com/hashicorp/terraform/helper/wrappedstreams/streams_other.go index 5ffa413bc2..82f1e150ca 100644 --- a/vendor/github.com/hashicorp/terraform/helper/wrappedstreams/streams_other.go +++ b/vendor/github.com/hashicorp/terraform/helper/wrappedstreams/streams_other.go @@ -4,11 +4,18 @@ package wrappedstreams import ( "os" + "sync" ) +var initOnce sync.Once + func initPlatform() { - // The standard streams are passed in via extra file descriptors. - wrappedStdin = os.NewFile(uintptr(3), "stdin") - wrappedStdout = os.NewFile(uintptr(4), "stdout") - wrappedStderr = os.NewFile(uintptr(5), "stderr") + // These must be initialized lazily, once it's been determined that this is + // a wrapped process. + initOnce.Do(func() { + // The standard streams are passed in via extra file descriptors. + wrappedStdin = os.NewFile(uintptr(3), "stdin") + wrappedStdout = os.NewFile(uintptr(4), "stdout") + wrappedStderr = os.NewFile(uintptr(5), "stderr") + }) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 838af4ad11..fdb9a6a1f1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -725,7 +725,7 @@ github.com/hashicorp/hil/scanner # github.com/hashicorp/logutils v1.0.0 ## explicit github.com/hashicorp/logutils -# github.com/hashicorp/terraform v0.12.21 => github.com/openshift/terraform v0.12.20-openshift-3 +# github.com/hashicorp/terraform v0.12.21 => github.com/openshift/terraform v0.12.20-openshift-4 ## explicit github.com/hashicorp/terraform/addrs github.com/hashicorp/terraform/backend @@ -2014,7 +2014,7 @@ sigs.k8s.io/yaml # github.com/Azure/go-autorest/autorest/azure/auth => github.com/tombuildsstuff/go-autorest/autorest/azure/auth v0.4.3-0.20200416184303-d4e299a3c04a # github.com/coreos/go-systemd => github.com/coreos/go-systemd/v22 v22.0.0 # github.com/go-log/log => github.com/go-log/log v0.1.1-0.20181211034820-a514cf01a3eb -# github.com/hashicorp/terraform => github.com/openshift/terraform v0.12.20-openshift-3 +# github.com/hashicorp/terraform => github.com/openshift/terraform v0.12.20-openshift-4 # github.com/hashicorp/terraform-plugin-sdk => github.com/openshift/hashicorp-terraform-plugin-sdk v1.14.0-openshift # github.com/metal3-io/baremetal-operator => github.com/openshift/baremetal-operator v0.0.0-20200702005656-4ce920a36861 # github.com/metal3-io/cluster-api-provider-baremetal => github.com/openshift/cluster-api-provider-baremetal v0.0.0-20190821174549-a2a477909c1d