From 87cfc33b143beb6281c9c2432585619fd9aebfa2 Mon Sep 17 00:00:00 2001 From: Di Xu Date: Mon, 19 Mar 2018 15:23:41 +0800 Subject: [PATCH] bump spf13/cobra(c439c4): Terminate the stripping of flags when -- is found --- Godeps/Godeps.json | 8 ++++---- .../k8s.io/apiextensions-apiserver/Godeps/Godeps.json | 2 +- staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json | 2 +- .../src/k8s.io/sample-apiserver/Godeps/Godeps.json | 2 +- vendor/github.com/spf13/cobra/bash_completions.md | 11 ++++++----- vendor/github.com/spf13/cobra/command.go | 3 +++ 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index b03917c2a3c..a3dac87a27c 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -2582,13 +2582,13 @@ }, { "ImportPath": "github.com/spf13/cobra", - "Comment": "v0.0.1-32-g6644d46", - "Rev": "6644d46b81fa1831979c4cded0106e774e0ef0ab" + "Comment": "v0.0.1-34-gc439c4f", + "Rev": "c439c4fa093711d42e1b01acb1235b52004753c1" }, { "ImportPath": "github.com/spf13/cobra/doc", - "Comment": "v0.0.1-32-g6644d46", - "Rev": "6644d46b81fa1831979c4cded0106e774e0ef0ab" + "Comment": "v0.0.1-34-gc439c4f", + "Rev": "c439c4fa093711d42e1b01acb1235b52004753c1" }, { "ImportPath": "github.com/spf13/jwalterweatherman", diff --git a/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json b/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json index 89d634346ad..15f2b687603 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json @@ -584,7 +584,7 @@ }, { "ImportPath": "github.com/spf13/cobra", - "Rev": "6644d46b81fa1831979c4cded0106e774e0ef0ab" + "Rev": "c439c4fa093711d42e1b01acb1235b52004753c1" }, { "ImportPath": "github.com/spf13/pflag", diff --git a/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json b/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json index 25822d775e6..21433ccd64c 100644 --- a/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json +++ b/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json @@ -268,7 +268,7 @@ }, { "ImportPath": "github.com/spf13/cobra", - "Rev": "6644d46b81fa1831979c4cded0106e774e0ef0ab" + "Rev": "c439c4fa093711d42e1b01acb1235b52004753c1" }, { "ImportPath": "github.com/spf13/pflag", diff --git a/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json b/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json index 068e15556c0..1f723fb838c 100644 --- a/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json @@ -252,7 +252,7 @@ }, { "ImportPath": "github.com/spf13/cobra", - "Rev": "6644d46b81fa1831979c4cded0106e774e0ef0ab" + "Rev": "c439c4fa093711d42e1b01acb1235b52004753c1" }, { "ImportPath": "github.com/spf13/pflag", diff --git a/vendor/github.com/spf13/cobra/bash_completions.md b/vendor/github.com/spf13/cobra/bash_completions.md index 691a04e190b..8d01f456f8a 100644 --- a/vendor/github.com/spf13/cobra/bash_completions.md +++ b/vendor/github.com/spf13/cobra/bash_completions.md @@ -6,15 +6,16 @@ Generating bash completions from a cobra command is incredibly easy. An actual p package main import ( - "io/ioutil" - "os" + "io/ioutil" + "os" - "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd" + "k8s.io/kubernetes/pkg/kubectl/cmd" + "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) func main() { - kubectl := cmd.NewFactory(nil).NewKubectlCommand(os.Stdin, ioutil.Discard, ioutil.Discard) - kubectl.GenBashCompletionFile("out.sh") + kubectl := cmd.NewKubectlCommand(util.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard) + kubectl.GenBashCompletionFile("out.sh") } ``` diff --git a/vendor/github.com/spf13/cobra/command.go b/vendor/github.com/spf13/cobra/command.go index 29675b33632..15b8112795c 100644 --- a/vendor/github.com/spf13/cobra/command.go +++ b/vendor/github.com/spf13/cobra/command.go @@ -475,6 +475,9 @@ Loop: s := args[0] args = args[1:] switch { + case s == "--": + // "--" terminates the flags + break Loop case strings.HasPrefix(s, "--") && !strings.Contains(s, "=") && !hasNoOptDefVal(s[2:], flags): // If '--flag arg' then // delete arg from args.