Skip to content

Commit fe43dcb

Browse files
committed
use fatal instead of usage
this is a error, not a mistake of command option usage
1 parent 36bb053 commit fe43dcb

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

show-busy-java-threads

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,8 @@ use_ps=${use_ps:-false}
190190
top_delay=${top_delay:-0.5}
191191

192192
if [ -n "$jstack_file_dir" -a -e "$jstack_file_dir" ]; then
193-
if [ ! -d "$jstack_file_dir" ]; then
194-
usage 1 "$jstack_file_dir exists but is not a directory!"
195-
fi
196-
if [ ! -w "$jstack_file_dir" ]; then
197-
usage 1 "$jstack_file_dir directory exists but is not writable!"
198-
fi
193+
[ ! -d "$jstack_file_dir" ] && fatal "Error: $jstack_file_dir(specified by option -S, the dir for storing jstack output files) exists but is not a directory!"
194+
[ ! -w "$jstack_file_dir" ] && fatal "Error: directory $jstack_file_dir(specified by option -S, the dir for storing jstack output files) exists but is not writable!"
199195
fi
200196

201197
update_delay=${1:-0}

0 commit comments

Comments
 (0)