From 10fc71f10175ec2dfc0e4f3e9ec6a873e5b21cb9 Mon Sep 17 00:00:00 2001 From: Joshua Swigut <62301576+JJSwigut@users.noreply.github.com> Date: Tue, 16 Dec 2025 12:26:40 -0500 Subject: [PATCH] Fix YAML serialization for recipes with special characters (#5796) Co-authored-by: Swiggy Swigut --- crates/goose/src/recipe/local_recipes.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/goose/src/recipe/local_recipes.rs b/crates/goose/src/recipe/local_recipes.rs index 67b8673efd..dc7fcdab66 100644 --- a/crates/goose/src/recipe/local_recipes.rs +++ b/crates/goose/src/recipe/local_recipes.rs @@ -7,7 +7,6 @@ use crate::config::paths::Paths; use crate::recipe::read_recipe_file_content::{read_recipe_file, RecipeFile}; use crate::recipe::Recipe; use crate::recipe::RECIPE_FILE_EXTENSIONS; -use serde_yaml; const GOOSE_RECIPE_PATH_ENV_VAR: &str = "GOOSE_RECIPE_PATH"; @@ -187,7 +186,7 @@ pub fn save_recipe_to_file(recipe: Recipe, file_path: Option) -> anyhow fs::create_dir_all(parent)?; } - let yaml_content = serde_yaml::to_string(&recipe)?; + let yaml_content = recipe.to_yaml()?; fs::write(&file_path_value, yaml_content)?; Ok(file_path_value) }