not language dependent git command

This commit is contained in:
AdrianLxM 2019-04-25 20:42:34 +02:00 committed by GitHub
parent 8b18a7ffb3
commit 6fd8d7ae3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,7 +79,7 @@ def allCommited = { ->
try { try {
def stdout = new ByteArrayOutputStream() def stdout = new ByteArrayOutputStream()
exec { exec {
commandLine 'git', 'status' commandLine 'git', 'status', '-s'
standardOutput = stdout standardOutput = stdout
} }
String commitObject = stdout.toString().trim() String commitObject = stdout.toString().trim()
@ -87,7 +87,7 @@ def allCommited = { ->
} catch (ignored) { } catch (ignored) {
return false; // NoGitSystemAvailable return false; // NoGitSystemAvailable
} }
return stringBuilder.toString().contains("nothing to commit") || stringBuilder.toString().contains("nichts zu committen") return stringBuilder.toString().isEmpty()
} }