mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
Fix YAML serialization for recipes with special characters (#5796)
Co-authored-by: Swiggy Swigut <swiggy@squareup.com>
This commit is contained in:
@@ -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<PathBuf>) -> 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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user