mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-01-19 16:28:18 +08:00
Only log checksum is valid when it really is (#97)
This commit is contained in:
parent
abac0ce7b0
commit
8c3a35e468
BIN
dist/setup/index.js
generated
vendored
BIN
dist/setup/index.js
generated
vendored
Binary file not shown.
@ -12,7 +12,7 @@ export async function validateChecksum(
|
||||
platform: Platform,
|
||||
version: string,
|
||||
): Promise<void> {
|
||||
let isValid = true;
|
||||
let isValid: boolean | undefined = undefined;
|
||||
if (checkSum !== undefined && checkSum !== "") {
|
||||
isValid = await validateFileCheckSum(downloadPath, checkSum);
|
||||
} else {
|
||||
@ -27,10 +27,12 @@ export async function validateChecksum(
|
||||
}
|
||||
}
|
||||
|
||||
if (!isValid) {
|
||||
if (isValid === false) {
|
||||
throw new Error(`Checksum for ${downloadPath} did not match ${checkSum}.`);
|
||||
}
|
||||
if (isValid === true) {
|
||||
core.debug(`Checksum for ${downloadPath} is valid.`);
|
||||
}
|
||||
}
|
||||
|
||||
async function validateFileCheckSum(
|
||||
|
Loading…
Reference in New Issue
Block a user