Skip to content

Commit d811fd1

Browse files
committed
fix(osinstaller): warn when checksums file is missing or incomplete for custom versions
When a version file is present but the checksums file is missing or lacks an entry for the current platform, log a warning to make the unverified download visible rather than silently skipping verification.
1 parent 9776d87 commit d811fd1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/osinstaller/CxInstaller.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ export class CxInstaller {
7979
try {
8080
const content = await fsPromises.readFile(this.getChecksumsFilePath(), 'utf-8');
8181
checksum = (JSON.parse(content) as Record<string, string>)[key] ?? null;
82+
if (checksum === null) {
83+
logger.warn(`No checksum found for ${key} in checksums file. Download will not be verified.`);
84+
}
8285
} catch {
86+
logger.warn(`Checksums file not found. Download of version ${version} will not be verified.`);
8387
checksum = null;
8488
}
8589
}

0 commit comments

Comments
 (0)