Skip to content

fix(install): avoid zsh nomatch error when checking Playwright dirs#49

Open
oopslink wants to merge 1 commit into
OpenBMB:mainfrom
oopslink:fix/install-zsh-glob-nomatch
Open

fix(install): avoid zsh nomatch error when checking Playwright dirs#49
oopslink wants to merge 1 commit into
OpenBMB:mainfrom
oopslink:fix/install-zsh-glob-nomatch

Conversation

@oopslink
Copy link
Copy Markdown

@oopslink oopslink commented May 29, 2026

Problem
In the has_playwright_chrome_for_testing() function in install.sh, the original glob pattern could fail when NOMATCH is enabled in zsh. If no files matched, it would throw zsh: no matches found, causing the installation script to stop.

Fix
Replaced the glob pattern with a POSIX-compatible find + grep -q . approach, ensuring consistent behavior across bash, zsh, dash, and other shells.

Changed File
install.shhas_playwright_chrome_for_testing() function.

In zsh, unmatched globs in a for-loop throw a "no matches found" error
by default (nomatch option). Combined with `set -euo pipefail`, this
caused the installer to exit when no mcp-chrome-for-testing-* dirs
existed. Replace glob expansion with `find` to avoid shell glob errors
entirely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant