Skip to content

Commit

Permalink
fix after reviews
Browse files Browse the repository at this point in the history
Signed-off-by: Stephane Bouchet <[email protected]>
  • Loading branch information
sbouchet committed Jun 20, 2024
1 parent 3021be0 commit 793ca9a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private CompletableFuture<ToolInstance> downloadIfRequiredAsyncInner(String tool
Path path = Paths.get(tool.getBaseDir().replace("$HOME", CommonConstants.HOME_FOLDER), "cache", tool.getVersion(), command);
final String cmd = path.toString();
if (!Files.exists(path)) {
return downloadInBackground(toolName, platform, path, cmd, tool, version, platform.getSha256());
result = downloadInBackground(toolName, platform, path, cmd, tool, version, platform.getSha256());
} else {
result.complete(new ToolInstance(cmd, false));
}
Expand Down Expand Up @@ -325,7 +325,7 @@ private boolean verify(Path path, String checksum) throws IOException {
byte[] hash = digest.digest(Files.readAllBytes(path));
return MessageDigest.isEqual(hash, checksum.getBytes(StandardCharsets.UTF_8));
} catch (NoSuchAlgorithmException e) {
throw new IOException(e);
throw new IOException("Could not verify checksum for file " + path.toString(), e);
}
}

Expand Down

0 comments on commit 793ca9a

Please sign in to comment.