-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Description
downloadArtifact calls validateArtifact to check the sha256 sums of a cached or newly downloaded file. It uses the download method internally to fetch the SHASUMS256 file and that also calls validateArtifact.
validateArtifact when called for SHASUMS256 starts by creating a new electron-download-xxxxxx directory in /tmp but then takes no further action:
return await withTempDirectoryIn(artifactDetails.tempDirectory, async (tempFolder) => {
// Don't try to verify the hash of the hash file itself
// and for older versions that don't have a SHASUMS256.txt
if (!artifactDetails.artifactName.startsWith('SHASUMS256') &&
As a consequence the newly created directory is not removed.
Additionally the tempDirectory setting in artifactDetails is not used for this directory:
shasumPath = await _downloadArtifact({
isGeneric: true,
version: artifactDetails.version,
artifactName: 'SHASUMS256.txt',
downloadOptions: artifactDetails.downloadOptions,
cacheRoot: artifactDetails.cacheRoot,
downloader: artifactDetails.downloader,
mirrorOptions: artifactDetails.mirrorOptions,
// Never use the cache for loading checksums, load
// them fresh every time
cacheMode: ElectronDownloadCacheMode.Bypass,
});
The argument this download call should copy tempDirectory from artifactDetails
Metadata
Metadata
Assignees
Labels
No labels