mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
support ARTHAS_LIB_DIR env. close #1861
This commit is contained in:
@@ -132,8 +132,14 @@ public class Bootstrap {
|
||||
private String disabledCommands;
|
||||
|
||||
static {
|
||||
ARTHAS_LIB_DIR = new File(
|
||||
System.getProperty("user.home") + File.separator + ".arthas" + File.separator + "lib");
|
||||
String arthasLibDirEnv = System.getenv("ARTHAS_LIB_DIR");
|
||||
if (arthasLibDirEnv != null) {
|
||||
ARTHAS_LIB_DIR = new File(arthasLibDirEnv);
|
||||
} else {
|
||||
ARTHAS_LIB_DIR = new File(
|
||||
System.getProperty("user.home") + File.separator + ".arthas" + File.separator + "lib");
|
||||
}
|
||||
|
||||
try {
|
||||
ARTHAS_LIB_DIR.mkdirs();
|
||||
} catch (Throwable t) {
|
||||
|
||||
Reference in New Issue
Block a user