Skip to content

feat: Add --disable-playwright flag to prevent Playwright installation and prompts #3806

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 1 commit into
base: main
Choose a base branch
from

Conversation

ei-grad
Copy link

@ei-grad ei-grad commented Apr 14, 2025

This PR introduces a new command-line argument --disable-playwright to address user requests for a way to prevent Aider from prompting for Playwright installation or attempting to use it for web scraping.

Problem:
Users, particularly those running Aider in automated environments or on operating systems not supported by Playwright, found the repeated prompts to install Playwright disruptive (as reported in #3765). Even with --yes-always, the installation process could hang waiting for sudo passwords.

Solution:

  • Added a --disable-playwright flag (defaulting to False).
  • When --disable-playwright is set to True, Aider will:
    • Skip the check/prompt for Playwright installation within the /web command.
    • Initialize the Scraper with playwright_available=False, ensuring it falls back to using httpx for scraping.
  • Added tests to verify the behavior of the flag and ensure no warnings are emitted when Playwright is explicitly disabled.

This change allows users to completely opt-out of Playwright functionality if desired.

Fixes #3765

@ei-grad ei-grad force-pushed the disable-playwright branch from 2c40bdd to f106993 Compare April 14, 2025 23:35
@ei-grad ei-grad marked this pull request as ready for review April 14, 2025 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How do I disable Playwright
2 participants