-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
🪲 bugSomething isn't workingSomething isn't working
Description
When downloading from a mirror and specifying a custom filename, the SHASUMS256.txt is always invalid. When the checksum is downloaded in this case
Lines 125 to 138 in 9034cc4
| if ( | |
| !artifactDetails.artifactName.startsWith('SHASUMS256') && | |
| !artifactDetails.unsafelyDisableChecksums | |
| ) { | |
| const shasumPath = await downloadArtifact({ | |
| isGeneric: true, | |
| version: artifactDetails.version, | |
| artifactName: 'SHASUMS256.txt', | |
| force: artifactDetails.force, | |
| downloadOptions: artifactDetails.downloadOptions, | |
| cacheRoot: artifactDetails.cacheRoot, | |
| downloader: artifactDetails.downloader, | |
| mirrorOptions: artifactDetails.mirrorOptions, | |
| }); |
Line 61 in 9034cc4
| const file = mirrorVar('customFilename', opts, getArtifactFileName(details)); |
Lines 27 to 43 in 9034cc4
| function mirrorVar( | |
| name: keyof Omit<MirrorOptions, 'resolveAssetURL'>, | |
| options: MirrorOptions, | |
| defaultValue: string, | |
| ) { | |
| // Convert camelCase to camel_case for env var reading | |
| const lowerName = name.replace(/([a-z])([A-Z])/g, (_, a, b) => `${a}_${b}`).toLowerCase(); | |
| return ( | |
| process.env[`NPM_CONFIG_ELECTRON_${lowerName.toUpperCase()}`] || | |
| process.env[`npm_config_electron_${lowerName}`] || | |
| process.env[`npm_package_config_electron_${lowerName}`] || | |
| process.env[`ELECTRON_${lowerName.toUpperCase()}`] || | |
| options[name] || | |
| defaultValue | |
| ); | |
| } |
Can reproduce by setting the mirror var for electron custom filename and trying to get the electron binary via downloadArtifact(). The checksum will error with Error: Could not parse checksum file at line 1: PK as the SHASUMS256.txt is invalid
Metadata
Metadata
Assignees
Labels
🪲 bugSomething isn't workingSomething isn't working