Merge pull request #1770 from MilosKozak/AdrianLxM-patch-1

not language dependent git command
This commit is contained in:
Milos Kozak 2019-04-25 21:01:41 +02:00 committed by GitHub
commit c56902d8d3
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()
} }