Skip to content
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

Prevent console from closing when running as an frozen executable on windows #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sibalzer
Copy link

proposal for #63

@yunzheng
Copy link
Member

I think we also need an option for not pausing, for example --no-auto-prompt, or else everyone that is deploying log4j-finder automatically will have a pause that cannot be cancelled.

Instead of os.system("pause") the following is preffered input("Press any key to continue..") so we do not execute a subprocess.

Also now Windows users always get this prompt, which could be annoying. We could make an autodetect if run via console or Explorer/GUI on windows, but still override it with the --no-auto-prompt in case it doesn't work properly.
I have googled a bit and people seem to detect if run via cmd.exe or powershell.exe by checking if some Environment variables exists. For example PROMPT and PsModulePath, these do not exist when run via Explorer.

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.

None yet

2 participants