Skip to content

Commit

Permalink
Merge pull request #96 from jcrben/use-wakatime-home
Browse files Browse the repository at this point in the history
Use WAKATIME_HOME env
  • Loading branch information
alanhamlett committed Jan 24, 2018
2 parents 7206be2 + cdf3711 commit f9b0a8c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/com/wakatime/intellij/plugin/Dependencies.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ public static boolean isPythonInstalled() {

public static String getResourcesLocation() {
if (Dependencies.resourcesLocation == null) {
if (System.getenv("WAKATIME_HOME")) {
File appDataFolder = new File(System.getenv("WAKATIME_HOME"));
File resourcesFolder = new File(System.getenv("WAKATIME_HOME"));
Dependencies.resourcesLocation = resourcesFolder.getAbsolutePath();
return Dependencies.resourcesLocation;
}

if (isWindows()) {
File appDataFolder = new File(System.getenv("APPDATA"));
File resourcesFolder = new File(appDataFolder, "WakaTime");
Expand Down

0 comments on commit f9b0a8c

Please sign in to comment.