Make it startable from playwright and also isolate (#5016)

Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
Douwe Osinga
2025-10-06 20:59:26 -04:00
committed by GitHub
parent 1690cf9091
commit d3a222ddbf
22 changed files with 150 additions and 144 deletions
+2 -6
View File
@@ -1,6 +1,6 @@
use anyhow::{Context, Result};
use chrono::{DateTime, Utc};
use etcetera::{choose_app_strategy, AppStrategy};
use goose::config::paths::Paths;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::fs;
@@ -41,11 +41,7 @@ pub struct ProjectInfoDisplay {
impl ProjectTracker {
/// Get the path to the projects.json file
fn get_projects_file() -> Result<PathBuf> {
let projects_file = choose_app_strategy(crate::APP_STRATEGY.clone())
.context("goose requires a home dir")?
.in_data_dir("projects.json");
// Ensure data directory exists
let projects_file = Paths::in_data_dir("projects.json");
if let Some(parent) = projects_file.parent() {
if !parent.exists() {
fs::create_dir_all(parent)?;