mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
fix displaying of errors (e.g. no rpmbuild)
This commit is contained in:
parent
bfdbd05ff5
commit
f2f79cdcbf
@ -22,7 +22,7 @@ String exec(def line, String dir = ".", boolean failOnError = true) {
|
||||
def proc = Runtime.getRuntime().exec(line, null, project.file(dir))
|
||||
if (proc.waitFor() == 0) return new String(proc.inputStream.readAllBytes()).trim()
|
||||
else {
|
||||
if (failOnError) throw new Exception(line + "\n" + new String(proc.errorStream.readAllBytes()))
|
||||
if (failOnError) throw new Exception(line.toString() + "\n" + new String(proc.errorStream.readAllBytes()))
|
||||
else return null
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user