pulumi/pkg
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
..
apitype Don't try to convert a checkpoint's Latest field if nil (#1800) 2018-08-20 13:47:49 -07:00
backend Warn when pulumi is out of date 2018-08-13 13:18:02 -07:00
diag Add support for providing a log stream-id to our RPC interface. (#1627) 2018-07-11 15:04:00 -07:00
encoding Add license headers 2018-05-22 15:02:47 -07:00
engine Add test for pulumi/pulumi#1770 (#1773) 2018-08-14 15:32:23 -07:00
graph Add license headers 2018-05-22 15:02:47 -07:00
operations Save resources obtained from ".get" in the snapshot (#1654) 2018-08-03 14:06:00 -07:00
resource Fix wierd interactions due to Cobra and glog 2018-08-20 14:08:40 -07:00
testing Initial support for passing URLs to new and up (#1727) 2018-08-10 18:08:16 -07:00
tokens Add license headers 2018-05-22 15:02:47 -07:00
tools Add license headers 2018-05-22 15:02:47 -07:00
util Fix wierd interactions due to Cobra and glog 2018-08-20 14:08:40 -07:00
version Add license headers 2018-05-22 15:02:47 -07:00
workspace Warn when pulumi is out of date 2018-08-13 13:18:02 -07:00