try {
if (rubySourcesDir.exists() && rubySourcesDir.isDirectory()) {
return rubySourcesDir.getCanonicalPath();
}
throw new RunBuildException("Unable to find bundled ruby scripts folder("
+ rubySourcesDir.getCanonicalPath()
+ " [original path: " + rubySourcesDir.getPath() + "]). Plugin is damaged.");
} catch (Exception e) {
throw new RunBuildException(e.getMessage(), e);
}
}