Skip to content

Commit

Permalink
Merge pull request #4073 from ashutosrath/master
Browse files Browse the repository at this point in the history
fix #4072 : minor_version of kubectl calculated by stripping '+' correctly
  • Loading branch information
LiilyZhang authored Jul 23, 2024
2 parents 5ed9120 + 1d653b8 commit b10d2cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent-install/agent-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ function get_kubernetes_version() {
major_version=$($KUBECTL version -o json | jq '.serverVersion.major' | sed s/\"//g)
minor_version=$($KUBECTL version -o json | jq '.serverVersion.minor' | sed s/\"//g)
if [ "${minor_version:0-1}" == "+" ]; then
minor_version=${minor_version::-1}
minor_version=${minor_version::$((${#minor_version} - 1))}
fi

full_version="$major_version.$minor_version"
Expand Down

0 comments on commit b10d2cd

Please sign in to comment.