Skip to content

Commit

Permalink
Merge pull request #384 from madvay/cfReport
Browse files Browse the repository at this point in the history
CycleFinderTask should indeed write a report on failure
  • Loading branch information
advayDev1 committed Aug 23, 2015
2 parents 881b8b9 + 5c93f8b commit 53d3eae
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class CycleFinderTask extends DefaultTask {
if (!Utils.isProjectExecNonZeroExit(exception)) {
throw exception
}

String cyclesFoundStr = Utils.matchRegexOutputs(stdout, stderr, cyclesFoundRegex)
if (!cyclesFoundStr?.isInteger()) {
String message =
Expand Down Expand Up @@ -194,10 +194,10 @@ class CycleFinderTask extends DefaultTask {
throw new InvalidUserDataException(message)
}
// Suppress exception when cycles found == cycleFinderExpectedCycles
} finally {
// Write output always.
getReportFile().write(Utils.stdOutAndErrToLogString(stdout, stderr))
logger.debug("CycleFinder Output: ${getReportFile().path}")
}

// Only write output if task is successful
getReportFile().write(Utils.stdOutAndErrToLogString(stdout, stderr))
logger.debug("CycleFinder Output: ${getReportFile().path}")
}
}

0 comments on commit 53d3eae

Please sign in to comment.