mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-22 21:05:23 +00:00
Fix windows packaging tests (#47554)
On windows, it happens that the process we called terminates but some other process it creates still has the same output strems and thus the files open, so we can't clean it up. This PR makes the cleanup a best effort.
This commit is contained in:
parent
31a5e1c7ee
commit
65c473bd4b
@ -170,8 +170,12 @@ public class Shell {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
FileUtils.deleteIfExists(stdOut);
|
||||
FileUtils.deleteIfExists(stdErr);
|
||||
try {
|
||||
FileUtils.deleteIfExists(stdOut);
|
||||
FileUtils.deleteIfExists(stdErr);
|
||||
} catch (UncheckedIOException e) {
|
||||
logger.info("Cleanup of output files failed", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user