-
Notifications
You must be signed in to change notification settings - Fork 84
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
fix: allow the app to display logs when launced from the terminal on windows #238
fix: allow the app to display logs when launced from the terminal on windows #238
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please update your branch with the main branch? Also, you could possibly look into this crate.
I'm unable to test this right now due to the lack of a windows machine. |
806a9e1
to
414f991
Compare
Done!
|
I can test later today |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The unsuccessful CI runs are due to a linting issue from a previous PR. Thanks a lot again!
2cccec2
into
Universal-Debloater-Alliance:main
fixes: #237
While
#![windows_subsystem = "windows"]
is fine since we don't want the app to create the terminal on startup, this has the consequence of outright disabling terminal output, even if we launch it from the console.The proposed fix uses
windows-sys
to attach the process' stout to any available console.Reference: https://learn.microsoft.com/en-us/windows/console/attachconsole
While this introduces a new dependency, since they're raw FFI calls for the windows-api, they should add little to no overhead.