The glog package force the use of golang's underyling flag package, which Cobra does not use. To work around this, we had a complicated dance around defining flags in multiple places, calling flag.Parse explicitly and then stomping values in the flag package with values we got from Cobra. Because we ended up parsing parts of the command line twice, each with a different set of semantics, we ended up with bad UX in some cases. For example: `$ pulumi -v=10 --logflow update` Would fail with an error message that looked nothing like normal CLI errors, where as: `$ pulumi -v=10 update --logflow` Would behave as you expect. To address this, we now do two things: - We never call flag.Parse() anymore. Wacking the flags with values we got from Cobra is sufficent for what we care about. - We use a forked copy of glog which does not complain when flag.Parse() is not called before logging. Fixes #301 Fixes #710 Fixes #968
13 lines
336 B
TOML
13 lines
336 B
TOML
[[constraint]]
|
|
name = "github.com/Nvveen/Gotty"
|
|
revision = "a8b993ba6abdb0e0c12b0125c603323a71c7790c"
|
|
source = "https://github.com/ijc25/Gotty"
|
|
|
|
[[constraint]]
|
|
name = "github.com/golang/protobuf"
|
|
version = "v1.1.0"
|
|
|
|
[[override]]
|
|
name = "github.com/golang/glog"
|
|
source = "github.com/pulumi/glog"
|
|
branch = "pulumi-master"
|