feat: Created a new .install command to install bundled assets on-demand

This commit is contained in:
2026-05-18 14:59:02 -06:00
parent 5bd0766a60
commit a3d67bfbf7
8 changed files with 222 additions and 18 deletions
+2 -2
View File
@@ -85,7 +85,7 @@ impl Macro {
Ok(value)
}
pub fn install_macros() -> Result<()> {
pub fn install_macros(force: bool) -> Result<()> {
info!(
"Installing built-in macros in {}",
paths::macros_dir().display()
@@ -98,7 +98,7 @@ impl Macro {
let content = unsafe { std::str::from_utf8_unchecked(&embedded_file.data) };
let file_path = paths::macros_dir().join(file.as_ref());
if file_path.exists() {
if file_path.exists() && !force {
debug!(
"Macro file already exists, skipping: {}",
file_path.display()