build: merge double space in SHASUM validation logic (#29117)

This commit is contained in:
Samuel Attard
2021-05-12 01:49:16 -07:00
committed by GitHub
parent a51aaeb28f
commit 8944bceae2

View File

@@ -409,7 +409,7 @@ async function getShaSumMappingFromUrl (shaSumFileUrl, fileNamePrefix) {
const response = await got(shaSumFileUrl);
const raw = response.body;
return raw.split('\n').map(line => line.trim()).filter(Boolean).reduce((map, line) => {
const [sha, file] = line.split(' ');
const [sha, file] = line.replace(' ', ' ').split(' ');
map[file.slice(fileNamePrefix.length)] = sha;
return map;
}, {});