From 5dd3cc30e6f6c6732063aedf395d6bc7ef3dfbe4 Mon Sep 17 00:00:00 2001 From: James Feng <47167674+GhostDragon124@users.noreply.github.com> Date: Sat, 6 Jun 2026 08:30:30 +0800 Subject: [PATCH] fix: copy ripgrep vendor binary to both dist/ and dist-nosplit/ Previously only vendor/audio-capture was copied. Ripgrep was left to a postinstall download script, but no-split builds have no postinstall step. Now both builds get the ripgrep binary directly. --- build.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/build.ts b/build.ts index 6a72b3b02..376736162 100644 --- a/build.ts +++ b/build.ts @@ -56,10 +56,14 @@ console.log( `Bundled ${result.outputs.length} files to ${outdir}/ (patched ${patched} for Node.js compat)`, ) -// Step 4: Copy native .node addon files (audio-capture) -const vendorDir = join(outdir, 'vendor', 'audio-capture') -await cp('vendor/audio-capture', vendorDir, { recursive: true }) -console.log(`Copied vendor/audio-capture/ → ${vendorDir}/`) +// Step 4: Copy vendor binaries (audio-capture, ripgrep) +const distVendorAudio = join(outdir, 'vendor', 'audio-capture') +await cp('vendor/audio-capture', distVendorAudio, { recursive: true }) +console.log(`Copied vendor/audio-capture/ → ${distVendorAudio}/`) + +const distVendorRg = join(outdir, 'vendor', 'ripgrep') +await cp('src/utils/vendor/ripgrep', distVendorRg, { recursive: true }) +console.log(`Copied src/utils/vendor/ripgrep/ → ${distVendorRg}/`) // Step 5: Bundle download-ripgrep script as standalone JS for postinstall const rgScript = await Bun.build({