Try to shasum file

This commit is contained in:
Henry Mercer
2024-11-11 16:41:03 +00:00
parent ca4c034b14
commit e44aa4f878
3 changed files with 28 additions and 3 deletions
Generated
+12 -1
View File
@@ -140,7 +140,18 @@ async function extractTarZst(tar, tarVersion, logger) {
? ` Input stream has high water mark ${tar.readableHighWaterMark}.`
: ""}`);
if (typeof tar === "string") {
await (0, actions_util_1.runTool)("file", [tar]);
try {
await (0, actions_util_1.runTool)("sha256sum", [tar]);
}
catch (e) {
logger.error(`Could not determine the SHA256 checksum of the tar file at ${tar}. The underlying error was: ${e}`);
}
try {
await (0, actions_util_1.runTool)("file", [tar]);
}
catch (e) {
logger.error(`Could not determine the type of the tar file at ${tar}. The underlying error was: ${e}`);
}
}
try {
// Initialize args
+1 -1
View File
File diff suppressed because one or more lines are too long
+15 -1
View File
@@ -151,7 +151,21 @@ export async function extractTarZst(
);
if (typeof tar === "string") {
await runTool("file", [tar]);
try {
await runTool("sha256sum", [tar]);
} catch (e) {
logger.error(
`Could not determine the SHA256 checksum of the tar file at ${tar}. The underlying error was: ${e}`,
);
}
try {
await runTool("file", [tar]);
} catch (e) {
logger.error(
`Could not determine the type of the tar file at ${tar}. The underlying error was: ${e}`,
);
}
}
try {