Skip to content

Commit 20f320c

Browse files
committed
Fix exit code check in hack/grab-profiles.sh
[ $? ] is True regardless of whether the last command succeeds or not, which causes the script to not work.
1 parent 1d38084 commit 20f320c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

hack/grab-profiles.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ profile_components=""
6767
output_dir="."
6868
tunnel_port="${tunnel_port:-1234}"
6969

70-
args=$(getopt -o s:mho:k:c -l server:,master,heapster,output:,kubelet:,scheduler,controller-manager,help,inuse-space,inuse-objects,alloc-space,alloc-objects,cpu,kubelet-binary:,master-binary:,scheduler-binary:,controller-manager-binary:,scheduler-port:,controller-manager-port: -- "$@")
71-
if [[ $? ]]; then
70+
if ! args=$(getopt -o s:mho:k:c -l server:,master,heapster,output:,kubelet:,scheduler,controller-manager,help,inuse-space,inuse-objects,alloc-space,alloc-objects,cpu,kubelet-binary:,master-binary:,scheduler-binary:,controller-manager-binary:,scheduler-port:,controller-manager-port: -- "$@"); then
7271
>&2 echo "Error in getopt"
7372
exit 1
7473
fi

0 commit comments

Comments
 (0)