Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: --short arg in kubectl cmd does not exist in later versions #1429

Merged
merged 2 commits into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion sections/kubectl_version.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spaceship_kubectl_version() {
[[ -z $kube_context ]] && return

# if kubectl can't connect kubernetes cluster, kubernetes version section will be not shown
local kubectl_version=$(kubectl version --short 2>/dev/null | grep "Server Version" | sed 's/Server Version: \(.*\)/\1/')
local kubectl_version=$(kubectl version>/dev/null | grep "Server Version" | sed 's/Server Version: \(.*\)/\1/')
denysdovhan marked this conversation as resolved.
Show resolved Hide resolved
[[ -z $kubectl_version ]] && return

spaceship::section \
Expand Down