Skip to content

[fix] Two more dev:fetch bugs found in batch 6 - #675

Open
kmturley wants to merge 1 commit into
mainfrom
fix/fetch-unzip-warning-license-whitespace
Open

[fix] Two more dev:fetch bugs found in batch 6#675
kmturley wants to merge 1 commit into
mainfrom
fix/fetch-unzip-warning-license-whitespace

Conversation

@kmturley

Copy link
Copy Markdown
Member

Summary

Two more dev:fetch fixes found while continuing the plugin-batching effort (follow-up to #665):

  • unzip exit-code-1 warnings discarded a complete extraction. kevin-jenkins/PlugNspectr's Windows zip triggered unzip's "appears to use backslashes as path separators" warning (routine for Windows-built zips) — a non-fatal warning, but execSync throws on any non-zero exit, so extractArchive bailed via its outer catch and returned null even though the archive was fully extracted. This silently skipped real archive-content inspection in favor of unreliable release-body text matching, which incorrectly tagged the file contains: [vst3, component] — the release notes mentioned "AU" only in a sentence about a future macOS build, not this Windows asset. Fixed by swallowing the unzip call's exit code and relying on the existing dirHasFiles() check as the true success signal, matching every other archive type already handled this way in the same function.
  • License fingerprint matching failed on line-wrapped LICENSE files. n0emo/hyperclip's LICENSE is byte-for-byte standard MIT, but hard-wrapped at ~80 columns split "obtaining a copy" across a line break — the regex required a literal space, so it silently didn't match. Now collapses whitespace (including newlines) before matching.

Test plan

  • npm run check passes
  • Re-ran dev:fetch against kevin-jenkins/PlugNspectr — now correctly reports contains: [vst3] only, matching the actual zip contents (verified by mounting/extracting it manually)
  • Re-ran against n0emo/hyperclip — license now correctly detected as mit
  • Regression-checked OTODESK4193/GlitchNexus, EyalDelarea/Cycloscope, subhankardas15071992-cloud/protoplug, 008takeshi/Drawwave-Vocoder — all unchanged

- unzip exits 1 for recoverable warnings (e.g. "appears to use
  backslashes as path separators", routine for Windows-built zips)
  even though extraction completed fully. execSync treated any
  non-zero exit as failure, discarding a complete extraction and
  silently falling back to unreliable release-body text matching —
  which incorrectly tagged a Windows-only VST3 zip as also containing
  an Audio Unit because the release notes mentioned "AU" in an
  unrelated sentence about a future macOS build. Now swallows the
  unzip call's exit code and lets the existing dirHasFiles() check be
  the real success signal, consistent with every other archive type
  in this function.
- License fingerprint matching now collapses whitespace before
  matching. A LICENSE file hard-wrapped at ~80 columns split "obtaining
  a copy" across a line break, so the literal-space MIT regex silently
  failed to match a byte-for-byte standard MIT license.
@kmturley kmturley mentioned this pull request Jul 29, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant