summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor')
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/README.md1
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/cli.go16
-rw-r--r--vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/vendor.json6
3 files changed, 15 insertions, 8 deletions
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/README.md b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/README.md
index 1f69ccb20..dd211cf0e 100644
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/README.md
+++ b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/README.md
@@ -5,6 +5,7 @@ cli is the library that powers the CLI for
[Packer](https://github.com/mitchellh/packer),
[Serf](https://github.com/hashicorp/serf),
[Consul](https://github.com/hashicorp/consul),
+[Vault](https://github.com/hashicorp/vault),
[Terraform](https://github.com/hashicorp/terraform), and
[Nomad](https://github.com/hashicorp/nomad).
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/cli.go b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/cli.go
index 353edb6c2..4a69d176d 100644
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/cli.go
+++ b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/github.com/mitchellh/cli/cli.go
@@ -120,7 +120,13 @@ func (c *CLI) Run() (int, error) {
// Just show the version and exit if instructed.
if c.IsVersion() && c.Version != "" {
c.HelpWriter.Write([]byte(c.Version + "\n"))
- return 1, nil
+ return 0, nil
+ }
+
+ // Just print the help when only '-h' or '--help' is passed.
+ if c.IsHelp() && c.Subcommand() == "" {
+ c.HelpWriter.Write([]byte(c.HelpFunc(c.Commands) + "\n"))
+ return 0, nil
}
// Attempt to get the factory function for creating the command
@@ -133,13 +139,13 @@ func (c *CLI) Run() (int, error) {
command, err := raw.(CommandFactory)()
if err != nil {
- return 0, err
+ return 1, err
}
// If we've been instructed to just print the help, then print it
if c.IsHelp() {
c.commandHelp(command)
- return 1, nil
+ return 0, nil
}
// If there is an invalid flag, then error
@@ -454,7 +460,7 @@ const defaultHelpTemplate = `
{{.Help}}{{if gt (len .Subcommands) 0}}
Subcommands:
-{{ range $value := .Subcommands }}
+{{- range $value := .Subcommands }}
{{ $value.NameAligned }} {{ $value.Synopsis }}{{ end }}
-{{ end }}
+{{- end }}
`
diff --git a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/vendor.json b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/vendor.json
index 7514b1ac4..cc56af3f9 100644
--- a/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/vendor.json
+++ b/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/vendor/vendor.json
@@ -27,10 +27,10 @@
"revisionTime": "2016-08-06T12:27:52Z"
},
{
- "checksumSHA1": "W6WsJ7dtBT0coA3S5FpGR0k4IEU=",
+ "checksumSHA1": "UP+pXl+ic9y6qrpZA5MqDIAuGfw=",
"path": "github.com/mitchellh/cli",
- "revision": "494eb006fe29e9dc75fea6da4df4818f7e046b73",
- "revisionTime": "2017-02-08T07:23:55Z"
+ "revision": "ee8578a9c12a5bb9d55303b9665cc448772c81b8",
+ "revisionTime": "2017-03-28T05:23:52Z"
},
{
"checksumSHA1": "L3leymg2RT8hFl5uL+5KP/LpBkg=",