Skip to content

Commit 734fddb

Browse files
committed
feat: ✨ update windows ffmpeg
1 parent d8dc2ff commit 734fddb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

scripts/ensure-ffmpeg-sidecar.cjs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,17 @@ function verifyChecksum(file, expected, label) {
171171
const txt = fs.readFileSync(shaFile, 'utf8');
172172
// Typical format: <sha256> *ffmpeg-release-essentials.zip
173173
winSha = (txt.split(/\s+/)[0] || '').trim();
174-
} catch (_) {}
174+
} catch (err) {
175+
// No checksum available from remote and none provided via env.
176+
// Refuse to install unverified binaries.
177+
fail(
178+
'Missing SHA256 for Windows ffmpeg.zip.\n' +
179+
'Provide FFMPEG_WIN_ZIP_SHA256 env to pin a known archive, or ensure the .sha256 file is accessible.\n' +
180+
'Example: FFMPEG_WIN_URL + FFMPEG_WIN_ZIP_SHA256.'
181+
);
182+
}
175183
}
176-
if (winSha) verifyChecksum(zipFile, winSha, 'Windows ffmpeg.zip');
184+
verifyChecksum(zipFile, winSha, 'Windows ffmpeg.zip');
177185
const outDir = path.join(tmp, 'out');
178186
unzip(zipFile, outDir);
179187

0 commit comments

Comments
 (0)