File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
plugin/src/main/groovy/org/stoyicker/androidcheck Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,13 @@ abstract class CommonCheck<Config extends CommonConfig> {
6464 if (errorCount) {
6565 String errorMessage = getErrorMessage(errorCount, htmlReportFile)
6666 if (abortOnError) {
67- Desktop . getDesktop(). browse(new URI (" file://" + htmlReportFile. absolutePath))
67+ if (Desktop . isDesktopSupported()) {
68+ Desktop . getDesktop(). browse(new URI (" file://" + htmlReportFile. absolutePath))
69+ } else {
70+ target. logger. warn " Your system does not support java.awt.Desktop. " +
71+ " Not opening report automatically. " +
72+ " See https://github.com/stoyicker/android-check-2/issues/42"
73+ }
6874 throw new GradleException (errorMessage)
6975 } else {
7076 target. logger. warn errorMessage
You can’t perform that action at this time.
0 commit comments