Skip to content

Commit 97f2533

Browse files
committed
fix: create parent dir before writing agent-browser config.json
~/.agent-browser directory may not exist in CI environments, causing FileNotFoundError when install_agent_browser() writes the container-safe config. mkdir(parents=True) ensures the directory exists first.
1 parent c65c654 commit 97f2533

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

support/install-browser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ def _run_agent(*args: str) -> subprocess.CompletedProcess[str]:
126126
# Container-safe defaults: Chrome needs --no-sandbox in Docker/container
127127
config_path = Path.home() / ".agent-browser" / "config.json"
128128
if not config_path.is_file():
129+
config_path.parent.mkdir(parents=True, exist_ok=True)
129130
config_path.write_text(
130131
json.dumps({"args": "--no-sandbox"}, indent=2)
131132
)

0 commit comments

Comments
 (0)