Skip to content

Commit

Permalink
Parse Gradle versions even if strerr is not empty (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
yahavi authored Sep 27, 2023
1 parent 5bd7b99 commit 8938b21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build/gradle.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ func (gm *GradleModule) getExtractorVersionAndInitScript(gradleExecPath string)
if err := gradleRunConfig.runCmd(outBuffer, errBuffer); err != nil {
return "", "", err
}
if errBuffer.Len() > 0 {
return "", "", errors.New("unexpected error occurred during attempt to get the Gradle version: " + errBuffer.String())
}

gradleVersion, err := parseGradleVersion(outBuffer.String())
if err != nil {
if errBuffer.Len() > 0 {
err = errors.Join(err, errors.New(errBuffer.String()))
}
return "", "", err
}
gm.containingBuild.logger.Info("Using Gradle version:", gradleVersion.GetVersion())
Expand Down

0 comments on commit 8938b21

Please sign in to comment.