Skip to content

Commit

Permalink
Support for JDK 20
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalcolea committed Apr 26, 2023
1 parent 0a3f5bc commit 597fddf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
10 changes: 2 additions & 8 deletions src/main/groovy/nebula/plugin/info/scm/GitScmProvider.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,9 @@ class GitScmProvider extends AbstractScmProvider {

private String executeGitCommand(Object... args) {
try {
def execOutput = providerFactory.exec {
return providerFactory.exec {
it.commandLine(args)
it.ignoreExitValue = true
}
if(execOutput.result.isPresent() && execOutput.result.get().exitValue != 0) {
logger.error("Could not execute Git command: ${args.join(' ')} | Reason: ${execOutput.standardError.asText.get()}")
return null
}
return execOutput.standardOutput.asText.get().replaceAll("\n", "").trim()
}.standardOutput.asText.get().replaceAll("\n", "").trim()
} catch (Exception e) {
logger.error("Could not execute Git command: ${args.join(' ')}")
return null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import java.util.jar.Attributes
import java.util.jar.JarFile
import java.util.jar.Manifest

@IgnoreIf({ System.getenv('TITUS_TASK_ID') || jvm.isJava17() })
@IgnoreIf({ System.getenv('TITUS_TASK_ID') || jvm.isJava20() || jvm.isJava17() })
class ContinuousIntegrationInfoPluginSpec extends IntegrationSpec {

@Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import org.junit.rules.TemporaryFolder
import spock.lang.IgnoreIf
import spock.lang.Specification

@IgnoreIf({ jvm.isJava17() })
@IgnoreIf({ jvm.isJava17() || jvm.isJava20() })
class PerforceScmProviderSpec extends Specification {
@Rule
TemporaryFolder temp
Expand Down

0 comments on commit 597fddf

Please sign in to comment.