dd = home + "/" + dd.substring(1);
}
}
File f = new File(dd).getCanonicalFile();
if (!f.exists())
throw new FailureException(
"Path does not exist: WINTERWELL_HOME = " + f);
return f;
}
// (home)/winterwell?
String home = System.getProperty("user.home");
// No home? try /home/winterwell?
if (Utils.isBlank(home)) {
home = "/home";
}
File ddf = new File(home, "winterwell").getCanonicalFile();
if (ddf.exists() && ddf.isDirectory())
return ddf;
// Give up
throw new FailureException(
"Could not find directory - environment variable WINTERWELL_HOME is not set.");
} catch (IOException e) {
throw Utils.runtime(e);
}
}