Skip to content

Commit

Permalink
Merge pull request #2439 from AlexKoe/alexkoe-arm64
Browse files Browse the repository at this point in the history
Issue 2438 - agent-install.sh doesn't recognize "k3s kubectl" correctly due to a if/elif block sequence order problem
  • Loading branch information
linggao authored Apr 14, 2021
2 parents b4a2ab9 + 3aa21b4 commit a55d23e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions agent-install/agent-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -537,12 +537,12 @@ function get_all_variables() {
elif is_cluster; then
# check kubectl is available
KUBECTL=${KUBECTL:-kubectl} # the default is kubectl, or what they set in the env var
if command -v "$KUBECTL" >/dev/null 2>&1; then
: # nothing more to do
if command -v k3s kubectl; then
KUBECTL="k3s kubectl"
elif command -v microk8s.kubectl >/dev/null 2>&1; then
KUBECTL=microk8s.kubectl
elif command -v k3s kubectl; then
KUBECTL="k3s kubectl"
elif command -v "$KUBECTL" >/dev/null 2>&1; then
: # nothing more to do
else
log_fatal 2 "$KUBECTL is not available, please install $KUBECTL and ensure that it is found on your \$PATH"
fi
Expand Down

0 comments on commit a55d23e

Please sign in to comment.