From 20f320c6bdea93dce1ef0333958d105b7e051045 Mon Sep 17 00:00:00 2001 From: Quan Tian Date: Mon, 17 May 2021 14:47:05 +0800 Subject: [PATCH] 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. --- hack/grab-profiles.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hack/grab-profiles.sh b/hack/grab-profiles.sh index 6657aa03f81..4c9d4133e4f 100755 --- a/hack/grab-profiles.sh +++ b/hack/grab-profiles.sh @@ -67,8 +67,7 @@ profile_components="" output_dir="." tunnel_port="${tunnel_port:-1234}" -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: -- "$@") -if [[ $? ]]; then +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 >&2 echo "Error in getopt" exit 1 fi