pulumi/pkg/util
Matt Ellis acf0fb278a Fix wierd interactions due to Cobra and glog
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
2018-08-20 14:08:40 -07:00
..
archive Add license headers 2018-05-22 15:02:47 -07:00
buildutil Do not include git information in PyPI version. 2018-06-11 13:01:49 -06:00
cancel Add license headers 2018-05-22 15:02:47 -07:00
cmdutil 1-index error messages printed to the console (#1709) 2018-08-06 11:58:06 -07:00
contract Add license headers 2018-05-22 15:02:47 -07:00
fsutil Add license headers 2018-05-22 15:02:47 -07:00
gitutil Initial support for passing URLs to new and up (#1727) 2018-08-10 18:08:16 -07:00
httputil Fix httputil.DoWithRetry. (#1555) 2018-06-21 11:06:54 -07:00
logging Fix wierd interactions due to Cobra and glog 2018-08-20 14:08:40 -07:00
mapper Add license headers 2018-05-22 15:02:47 -07:00
retry Merge pull request #1358 from pulumi/retry-bugs 2018-06-01 17:11:23 -07:00
rpcutil Partial status for resource providers 2018-07-02 13:32:23 -07:00
testutil Rework CI detection logic 2018-08-08 20:51:25 -07:00