mirror of
https://gitee.com/arthas/arthas.git
synced 2024-11-30 03:07:37 +08:00
Fix typo (#582)
This commit is contained in:
parent
6a3aa5cb91
commit
445e8141bd
@ -100,7 +100,7 @@ public class AgentBootstrap {
|
||||
args = decodeArg(args);
|
||||
int index = args.indexOf(';');
|
||||
String agentJar = args.substring(0, index);
|
||||
final String agentArgs = args.substring(index, args.length());
|
||||
final String agentArgs = args.substring(index);
|
||||
|
||||
File agentJarFile = new File(agentJar);
|
||||
if (!agentJarFile.exists()) {
|
||||
|
@ -22,9 +22,9 @@ exit_on_err()
|
||||
}
|
||||
|
||||
# check permission to download && install
|
||||
[ ! -w ./ ] && exit_on_err 1 "permission denied, target directory ./ was not writable."
|
||||
[[ ! -w ./ ]] && exit_on_err 1 "permission denied, target directory ./ was not writable."
|
||||
|
||||
if [ $# -gt 1 ] && [ $1 = "--url" ]; then
|
||||
if [[ $# -gt 1 ]] && [[ $1 = "--url" ]]; then
|
||||
shift
|
||||
ARTHAS_FILE_URL=$1
|
||||
shift
|
||||
@ -35,14 +35,14 @@ echo "downloading... ${TEMP_ARTHAS_FILE}"
|
||||
curl \
|
||||
-sLk \
|
||||
--connect-timeout ${SO_TIMEOUT} \
|
||||
$ARTHAS_FILE_URL \
|
||||
${ARTHAS_FILE_URL} \
|
||||
-o ${TEMP_ARTHAS_FILE} \
|
||||
|| exit_on_err 1 "download failed!"
|
||||
|
||||
# wirte or overwrite local file
|
||||
# write or overwrite local file
|
||||
rm -rf as.sh
|
||||
mv ${TEMP_ARTHAS_FILE} ${TARGET_ARTHAS_FILE}
|
||||
chmod +x ${TARGET_ARTHAS_FILE}
|
||||
|
||||
# done
|
||||
echo "Arthas install successed."
|
||||
echo "Arthas install succeeded."
|
||||
|
@ -76,7 +76,7 @@ public class Bootstrap {
|
||||
* <pre>
|
||||
* The directory contains arthas-core.jar/arthas-client.jar/arthas-spy.jar.
|
||||
* 1. When use-version is not empty, try to find arthas home under ~/.arthas/lib
|
||||
* 2. Try set the directory where arthas-boot.jar is located to arhtas home
|
||||
* 2. Try set the directory where arthas-boot.jar is located to arthas home
|
||||
* 3. Try to download from maven repo
|
||||
* </pre>
|
||||
*/
|
||||
@ -524,7 +524,7 @@ public class Bootstrap {
|
||||
private static void verifyArthasHome(String arthasHome) {
|
||||
File home = new File(arthasHome);
|
||||
if (home.isDirectory()) {
|
||||
String fileList[] = { "arthas-core.jar", "arthas-agent.jar", "arthas-spy.jar" };
|
||||
String[] fileList = { "arthas-core.jar", "arthas-agent.jar", "arthas-spy.jar" };
|
||||
|
||||
for (String fileName : fileList) {
|
||||
if (!new File(home, fileName).exists()) {
|
||||
|
Loading…
Reference in New Issue
Block a user