From c0c5171fe72c80b6100dad99b822b80759881c80 Mon Sep 17 00:00:00 2001 From: hengyunabc Date: Fri, 23 Nov 2018 17:23:35 +0800 Subject: [PATCH] fix as.sh mingw support. #130 --- bin/as.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/as.sh b/bin/as.sh index f79f7261..a5c2f906 100755 --- a/bin/as.sh +++ b/bin/as.sh @@ -631,10 +631,13 @@ attach_jvm() echo "Attaching to ${TARGET_PID} using version ${1}..." - local opts="${ARTHAS_OPTS} ${BOOT_CLASSPATH} ${JVM_OPTS}" + local java_command=("${JAVA_HOME}"/bin/java) + if [ "${BOOT_CLASSPATH}" ]; then + java_command+=("${BOOT_CLASSPATH}") + fi - "${JAVA_HOME}"/bin/java \ - ${opts} \ + "${java_command[@]}" \ + ${ARTHAS_OPTS} ${JVM_OPTS} \ -jar "${arthas_lib_dir}/arthas-core.jar" \ -pid ${TARGET_PID} \ -target-ip ${TARGET_IP} \