pulumi/cmd
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.go Add license headers 2018-05-22 15:02:47 -07:00
cancel.go Initial support for passing URLs to new and up (#1727) 2018-08-10 18:08:16 -07:00
config.go Initial support for passing URLs to new and up (#1727) 2018-08-10 18:08:16 -07:00
config_test.go Consider the key name as part of secret detection 2018-08-09 19:10:14 -07:00
destroy.go Add a list of in-flight operations to the deployment (#1759) 2018-08-10 21:39:59 -07:00
errors.go Add a list of in-flight operations to the deployment (#1759) 2018-08-10 21:39:59 -07:00
gen_bash_completion.go Add license headers 2018-05-22 15:02:47 -07:00
gen_markdown.go Add license headers 2018-05-22 15:02:47 -07:00
login.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
logout.go Add license headers 2018-05-22 15:02:47 -07:00
logs.go Initial support for passing URLs to new and up (#1727) 2018-08-10 18:08:16 -07:00
logs_test.go Add license headers 2018-05-22 15:02:47 -07:00
new.go Add -g shorthand for --generate-only (#1797) 2018-08-20 10:33:41 -07:00
plugin.go Implement first-class providers. (#1695) 2018-08-06 17:50:29 -07:00
plugin_install.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
plugin_ls.go Add license headers 2018-05-22 15:02:47 -07:00
plugin_rm.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00
preview.go Add a list of in-flight operations to the deployment (#1759) 2018-08-10 21:39:59 -07:00
pulumi.go Fix wierd interactions due to Cobra and glog 2018-08-20 14:08:40 -07:00
refresh.go Add a list of in-flight operations to the deployment (#1759) 2018-08-10 21:39:59 -07:00
stack.go Initial support for passing URLs to new and up (#1727) 2018-08-10 18:08:16 -07:00
stack_export.go Initial support for passing URLs to new and up (#1727) 2018-08-10 18:08:16 -07:00
stack_graph.go Initial support for passing URLs to new and up (#1727) 2018-08-10 18:08:16 -07:00
stack_import.go Add a list of in-flight operations to the deployment (#1759) 2018-08-10 21:39:59 -07:00
stack_init.go Initial support for passing URLs to new and up (#1727) 2018-08-10 18:08:16 -07:00
stack_ls.go Remove PPC-specific codepaths (#1741) 2018-08-08 19:26:51 -07:00
stack_output.go Initial support for passing URLs to new and up (#1727) 2018-08-10 18:08:16 -07:00
stack_output_test.go Add license headers 2018-05-22 15:02:47 -07:00
stack_rm.go Tweak help text for pulumi stack rm -f (#1789) 2018-08-20 12:32:58 -07:00
stack_select.go Initial support for passing URLs to new and up (#1727) 2018-08-10 18:08:16 -07:00
up.go Add a list of in-flight operations to the deployment (#1759) 2018-08-10 21:39:59 -07:00
util.go Initial support for passing URLs to new and up (#1727) 2018-08-10 18:08:16 -07:00
version.go Add license headers 2018-05-22 15:02:47 -07:00
whoami.go Support the NO_COLOR env variable to suppres any colored output. (#1594) 2018-07-06 21:30:00 -07:00