From d28660ae49c9f226a1bb96d7d2fabfe8f9f4712f Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Fri, 8 May 2015 12:22:07 -0400 Subject: [PATCH] Remove useless bash conditional bash just returns the last return code, why are we testing and then doing the same? --- contrib/completions/bash/kubectl | 3 --- pkg/kubectl/cmd/cmd.go | 3 --- 2 files changed, 6 deletions(-) diff --git a/contrib/completions/bash/kubectl b/contrib/completions/bash/kubectl index 4d29416a5c5..639d7688437 100644 --- a/contrib/completions/bash/kubectl +++ b/contrib/completions/bash/kubectl @@ -174,9 +174,6 @@ __kubectl_get_resource() return 1 fi __kubectl_parse_get "${nouns[${#nouns[@]} -1]}" - if [[ $? -eq 0 ]]; then - return 0 - fi } # $1 is the name of the pod we want to get the list of containers inside diff --git a/pkg/kubectl/cmd/cmd.go b/pkg/kubectl/cmd/cmd.go index 6f4ac8d55e2..e8295041bd2 100644 --- a/pkg/kubectl/cmd/cmd.go +++ b/pkg/kubectl/cmd/cmd.go @@ -45,9 +45,6 @@ __kubectl_get_resource() return 1 fi __kubectl_parse_get "${nouns[${#nouns[@]} -1]}" - if [[ $? -eq 0 ]]; then - return 0 - fi } # $1 is the name of the pod we want to get the list of containers inside