Skip to content

Commit

Permalink
Fix getopts typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanwilson230 committed Nov 19, 2019
1 parent e2b4f71 commit 1425a93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kubectl-exec-as
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eu
usage() {
cat <<EOF
Usage: kubectl ezec-as [OPTIONS] <pod name> [-- <commands...>]
Usage: kubectl exec-as [OPTIONS] <pod name> [-- <commands...>]
Run a command in a running container
Expand Down Expand Up @@ -37,7 +37,7 @@ USERNAME="root"
CONTAINER="NONE"
NAMESPACE="NONE"

while getopts "dh:p:n:u:c" arg; do
while getopts "hdp:n:u:c:" arg; do
case $arg in
p) # Specify pod name.
POD=${OPTARG}
Expand Down Expand Up @@ -66,7 +66,7 @@ done

shift $((OPTIND-1))
if [[ -z ${1+x} ]]; then
echo "Error: You must specify the pod name" >&2
echo "Error: You have to specify the pod name" >&2
usage
fi
POD="$1"
Expand Down

0 comments on commit 1425a93

Please sign in to comment.