Merge pull request #30 from corda/CORE-12019/Capture-CPI-build-errors

CORE-12019 Capture CPI build errors simple impl from Graham
This commit is contained in:
egabrovski-r3 2023-03-30 09:37:12 +03:00 committed by GitHub
commit a043d8dcd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -205,18 +205,10 @@ public class BuildCPIsHelper {
Process proc = pb.start();
proc.waitFor();
// todo: work out how to capture error code better than the following code
// BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream()));
// File tempOutputFile = new File(String.format("%s/tempOutput.txt", pc.devEnvWorkspace));
// tempOutputFile.delete();
// FileWriter fileWriter = new FileWriter(tempOutputFile);
// String line;
// while (( line = reader.readLine()) != null){
// fileWriter.write(line + "\n");
// }
// fileWriter.close();
//Get CPI packaging errors
if (proc.getErrorStream().available() > 0) {
proc.getErrorStream().transferTo(pc.out);
}
}
private void createNotaryCPI() throws CsdeException, IOException, InterruptedException {