diff --git a/crates/goose-cli/src/cli.rs b/crates/goose-cli/src/cli.rs index 34d4ec2b3bf9..9303641a3df9 100644 --- a/crates/goose-cli/src/cli.rs +++ b/crates/goose-cli/src/cli.rs @@ -1142,7 +1142,7 @@ pub async fn cli() -> anyhow::Result<()> { .and_then(|rf| { goose::recipe::template_recipe::parse_recipe_content( &rf.content, - Some(rf.parent_dir.to_string_lossy().to_string()), + Some(rf.parent_dir.display().to_string()), ) .ok() .map(|(r, _)| r.version) diff --git a/crates/goose-cli/src/recipes/search_recipe.rs b/crates/goose-cli/src/recipes/search_recipe.rs index 5bf509099062..0dd9a5255683 100644 --- a/crates/goose-cli/src/recipes/search_recipe.rs +++ b/crates/goose-cli/src/recipes/search_recipe.rs @@ -42,7 +42,7 @@ pub fn list_available_recipes() -> Result> { RecipeInfo { name, source: RecipeSource::Local, - path: path.to_string_lossy().to_string(), + path: path.display().to_string(), title: Some(recipe.title), description: Some(recipe.description), } diff --git a/crates/goose/src/recipe/local_recipes.rs b/crates/goose/src/recipe/local_recipes.rs index 1214ad3099e2..9413d268f712 100644 --- a/crates/goose/src/recipe/local_recipes.rs +++ b/crates/goose/src/recipe/local_recipes.rs @@ -63,7 +63,7 @@ pub fn load_local_recipe_file(recipe_name: &str) -> Result { let search_dirs_str = search_dirs .iter() - .map(|p| p.to_string_lossy()) + .map(|p| p.display().to_string()) .collect::>() .join(":"); Err(anyhow!(