Skip to content

Commit

Permalink
fix(get): use \s+ to split lines containing shasum info
Browse files Browse the repository at this point in the history
Fixes: #1317
  • Loading branch information
ayushmanchhabra committed Nov 28, 2024
1 parent 5d84eea commit 64f5709
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/get/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default async function verify(shaUrl, shaOut, cacheDir, ffmpeg, logLevel,
const shasum = await fs.promises.readFile(shaOut, { encoding: 'utf-8' });
const shasums = shasum.trim().split('\n');
for await (const line of shasums) {
const [storedSha, filePath] = line.split(' ');
const [storedSha, filePath] = line.split(/\s+/);
const relativeFilePath = path.resolve(cacheDir, filePath);
const relativefilePathExists = await util.fileExists(relativeFilePath);
if (relativefilePathExists) {
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/demo.linux.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import nwbuild from '../../src/index.js';

await nwbuild({
mode: 'build',
version: '0.14.7',
flavor: 'sdk',
platform: 'linux',
srcDir: './tests/fixtures/app',
Expand Down

0 comments on commit 64f5709

Please sign in to comment.