Skip to content
This repository has been archived by the owner on May 12, 2022. It is now read-only.

Commit

Permalink
kubectl: fix pod selection with --no-prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
John Esmet committed Jul 6, 2019
1 parent fa0d333 commit 2dbeea1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kubectl/podselectionstage.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ func getPodAndContainerSelection(ctx *ankh.ExecutionContext, kubectlOut string)
})
var err error
if ctx.NoPrompt {
lineSelection = lines[0]
// The first line is the header, so the "pod" is lines[1].
lineSelection = lines[1]
ctx.Logger.Warnf("Selecting first pod (of %d) \"%v\" due to `--no-prompt`",
len(lines), lineSelection)
} else {
Expand Down

0 comments on commit 2dbeea1

Please sign in to comment.