Skip to content

Commit 1425a93

Browse files
Fix getopts typo
1 parent e2b4f71 commit 1425a93

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kubectl-exec-as

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -eu
55
usage() {
66
cat <<EOF
77
8-
Usage: kubectl ezec-as [OPTIONS] <pod name> [-- <commands...>]
8+
Usage: kubectl exec-as [OPTIONS] <pod name> [-- <commands...>]
99
1010
Run a command in a running container
1111
@@ -37,7 +37,7 @@ USERNAME="root"
3737
CONTAINER="NONE"
3838
NAMESPACE="NONE"
3939

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

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

0 commit comments

Comments
 (0)