mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
## Summary - Automatically removes the "Original Filename" field from Windows single-file executables - Prevents compiled executables from incorrectly showing "bun.exe" as their original filename - Adds comprehensive tests to verify the field is properly removed ## Problem When creating single-file executables on Windows, the "Original Filename" metadata field was showing "bun.exe" regardless of the actual executable name. This was confusing for users and incorrect from a metadata perspective. ## Solution Modified `rescle__setWindowsMetadata()` in `src/bun.js/bindings/windows/rescle-binding.cpp` to automatically clear the `OriginalFilename` field by setting it to an empty string whenever Windows metadata is updated during executable creation. ## Test Plan - [x] Added tests in `test/bundler/compile-windows-metadata.test.ts` to verify: - Original Filename field is empty in basic compilation - Original Filename field remains empty even when all other metadata is set - [x] Verified cross-platform compilation with `bun run zig:check-all` - all platforms compile successfully The tests will run on Windows CI to verify the behavior is correct. 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>