diff --git a/qulice-checkstyle/src/main/java/com/qulice/checkstyle/CheckstyleValidator.java b/qulice-checkstyle/src/main/java/com/qulice/checkstyle/CheckstyleValidator.java index 906fdc2f3..5e08a7993 100644 --- a/qulice-checkstyle/src/main/java/com/qulice/checkstyle/CheckstyleValidator.java +++ b/qulice-checkstyle/src/main/java/com/qulice/checkstyle/CheckstyleValidator.java @@ -127,8 +127,16 @@ private Configuration configuration() { if (!parent.exists() && !parent.mkdirs()) { throw new IllegalStateException( String.format( - "Unable to create directories needed for %s", - cache.getPath() + "Unable to create directories needed for %s at %s", + cache.getPath(), parent.getAbsolutePath() + ) + ); + } + if (!parent.canWrite()) { + throw new IllegalStateException( + String.format( + "Unable to write to directory %s, check permissions.", + parent.getAbsolutePath() ) ); }