Skip to content

fix windows-hide-console for bun SFE #20594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rithvikvibhu
Copy link

What does this PR do?

#15894 added an option --windows-hide-console but it isn't really called. This PR fixes it.

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

How did you verify your code works?

before, generated exe always shows as console even with windows-hide-console set:

$ file testbin.exe
testbin.exe: PE32+ executable for MS Windows 6.00 (console), x86-64, 13 sections

now, if the flag is set:

$ file testbin.exe
testbin.exe: PE32+ executable for MS Windows 6.00 (GUI), x86-64, 13 sections

@Jarred-Sumner
Copy link
Collaborator

How does this PR fix it? The changes here likely do not compile and are not related to the PR description

Happy to re-open when you've pushed up relevant changes

Copy link
Member

@cirospaciari cirospaciari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contributions, just some comments + can you add a test?

@rithvikvibhu
Copy link
Author

@cirospaciari replied to the comments. For the test, I think test\bundler\bundler_compile.test.ts is a good place for it. But how do you think it should test since it directly modifies the exeutable? Run file? Or do whatever file does (read the exe and ensure the bytes are changed?

@cirospaciari
Copy link
Member

Thank you for the replies.
If file is available on every windows we can use it running with spawn, otherwise we need todo it manually

@rithvikvibhu
Copy link
Author

rithvikvibhu commented Jun 24, 2025

fyi none of the failing tests are related to these changes afaics. Do you think updating with main or rebasing will help?

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.

3 participants