mirror of https://github.com/pulumi/pulumi.git
acf0fb278a
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 |
||
---|---|---|
.. | ||
archive | ||
buildutil | ||
cancel | ||
cmdutil | ||
contract | ||
fsutil | ||
gitutil | ||
httputil | ||
logging | ||
mapper | ||
retry | ||
rpcutil | ||
testutil |