enhance: browser_install PR451 #454
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The original code used
lib/site-packages
, but Python venvs actually uselib/python3.X/site-packages
where X is the version number, the toolkit directory could never be found. fixed it to automatically detect the Python version and build the correct path.The code assumed stdout and stderr are always available, but they can be null in certain scenarios, added safety checks before trying to read from these streams to prevent crashes.
When testing if npm exists, the code only listened for the 'close' event. If npm doesn't exist or fails to run, the 'error'
event fires instead, causing the check to hang forever. added an error handler to properly handle this case.
the npm/build/playwright processes only had 'close' handlers but no 'error' handlers. If a process fails to start,
it triggers 'error' not 'close', which would cause the installation to hang. added error handlers for all three processes.
What is the purpose of this pull request?