diff --git a/go.mod b/go.mod index eb3c1a96437f..612ea5f353e8 100644 --- a/go.mod +++ b/go.mod @@ -76,6 +76,7 @@ require ( github.com/hashicorp/terraform-config-inspect v0.0.0-20190821133035-82a99dc22ef4 github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596 github.com/hashicorp/vault v0.10.4 + github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af github.com/jonboulle/clockwork v0.1.0 // indirect github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926 github.com/json-iterator/go v1.1.5 // indirect @@ -97,7 +98,7 @@ require ( github.com/mitchellh/go-wordwrap v1.0.0 github.com/mitchellh/hashstructure v1.0.0 github.com/mitchellh/mapstructure v1.1.2 - github.com/mitchellh/panicwrap v0.0.0-20190213213626-17011010aaa4 + github.com/mitchellh/panicwrap v1.0.0 github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51 github.com/mitchellh/reflectwalk v1.0.0 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect diff --git a/go.sum b/go.sum index 51ed2ad1dd6e..1286dd9cb2c8 100644 --- a/go.sum +++ b/go.sum @@ -250,7 +250,6 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba h1:NARVGAAgEXvoMeNPHhPFt1SBt1VMznA3Gnz9d0qj+co= @@ -311,8 +310,8 @@ github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9 github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/panicwrap v0.0.0-20190213213626-17011010aaa4 h1:jw9tsdJ1FQmUkyTXdIF/nByTX+mMnnp16glnvGZMsC4= -github.com/mitchellh/panicwrap v0.0.0-20190213213626-17011010aaa4/go.mod h1:YYMf4xtQnR8LRC0vKi3afvQ5QwRPQ17zjcpkBCufb+I= +github.com/mitchellh/panicwrap v1.0.0 h1:67zIyVakCIvcs69A0FGfZjBdPleaonSgGlXRSRlb6fE= +github.com/mitchellh/panicwrap v1.0.0/go.mod h1:pKvZHwWrZowLUzftuFq7coarnxbBXU4aQh3N0BJOeeA= github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51 h1:eD92Am0Qf3rqhsOeA1zwBHSfRkoHrt4o6uORamdmJP8= github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51/go.mod h1:kB1naBgV9ORnkiTVeyJOI1DavaJkG4oNIq0Af6ZVKUo= github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= diff --git a/vendor/github.com/mitchellh/panicwrap/go.mod b/vendor/github.com/mitchellh/panicwrap/go.mod index c35fabba86f0..40ccf8798313 100644 --- a/vendor/github.com/mitchellh/panicwrap/go.mod +++ b/vendor/github.com/mitchellh/panicwrap/go.mod @@ -1,3 +1,3 @@ module github.com/mitchellh/panicwrap -require github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 +go 1.13 diff --git a/vendor/github.com/mitchellh/panicwrap/go.sum b/vendor/github.com/mitchellh/panicwrap/go.sum index fd3e4dafabd1..e69de29bb2d1 100644 --- a/vendor/github.com/mitchellh/panicwrap/go.sum +++ b/vendor/github.com/mitchellh/panicwrap/go.sum @@ -1,2 +0,0 @@ -github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 h1:PJPDf8OUfOK1bb/NeTKd4f1QXZItOX389VN3B6qC8ro= -github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= diff --git a/vendor/github.com/mitchellh/panicwrap/panicwrap.go b/vendor/github.com/mitchellh/panicwrap/panicwrap.go index 028d69bfea84..1478244bfe9a 100644 --- a/vendor/github.com/mitchellh/panicwrap/panicwrap.go +++ b/vendor/github.com/mitchellh/panicwrap/panicwrap.go @@ -20,8 +20,6 @@ import ( "sync/atomic" "syscall" "time" - - "github.com/kardianos/osext" ) const ( @@ -118,7 +116,7 @@ func Wrap(c *WrapConfig) (int, error) { } // Get the path to our current executable - exePath, err := osext.Executable() + exePath, err := os.Executable() if err != nil { return -1, err } @@ -229,6 +227,11 @@ func Wrap(c *WrapConfig) (int, error) { // Wrapped checks if we're already wrapped according to the configuration // given. // +// It must be only called once with a non-nil configuration as it unsets +// the environment variable it uses to check if we are already wrapped. +// This prevents false positive if your program tries to execute itself +// recursively. +// // Wrapped is very cheap and can be used early to short-circuit some pre-wrap // logic your application may have. // @@ -253,6 +256,9 @@ func Wrapped(c *WrapConfig) bool { // If the cookie key/value match our environment, then we are the // child, so just exit now and tell the caller that we're the child result := os.Getenv(c.CookieKey) == c.CookieValue + if result { + os.Unsetenv(c.CookieKey) + } wrapCache.Store(result) return result } diff --git a/vendor/modules.txt b/vendor/modules.txt index 401dde88a926..3b0b83772c3f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -51,13 +51,13 @@ github.com/agl/ed25519/edwards25519 github.com/aliyun/alibaba-cloud-sdk-go/sdk github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests +github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses github.com/aliyun/alibaba-cloud-sdk-go/services/location github.com/aliyun/alibaba-cloud-sdk-go/services/sts github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors -github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses github.com/aliyun/alibaba-cloud-sdk-go/sdk/utils github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/signers # github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190103054945-8205d1f41e70 @@ -435,7 +435,7 @@ github.com/mitchellh/go-wordwrap github.com/mitchellh/hashstructure # github.com/mitchellh/mapstructure v1.1.2 github.com/mitchellh/mapstructure -# github.com/mitchellh/panicwrap v0.0.0-20190213213626-17011010aaa4 +# github.com/mitchellh/panicwrap v1.0.0 github.com/mitchellh/panicwrap # github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51 github.com/mitchellh/prefixedio @@ -488,9 +488,9 @@ github.com/zclconf/go-cty/cty github.com/zclconf/go-cty/cty/gocty github.com/zclconf/go-cty/cty/convert github.com/zclconf/go-cty/cty/json +github.com/zclconf/go-cty/cty/msgpack github.com/zclconf/go-cty/cty/function github.com/zclconf/go-cty/cty/function/stdlib -github.com/zclconf/go-cty/cty/msgpack github.com/zclconf/go-cty/cty/set # github.com/zclconf/go-cty-yaml v1.0.1 github.com/zclconf/go-cty-yaml