Skip to content

Commit

Permalink
improve(install,macos): Create Plugins directory if missing (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
rosofo authored Nov 2, 2024
1 parent 8f08481 commit 5149329
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions td-rs-xtask/src/macos/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use crate::config::Config;
use crate::metadata::PluginType;
use crate::util::ToTitleCase;
use crate::{build, PLUGIN_HOME};
use anyhow::Context;
use fs_extra::dir::CopyOptions;
use std::path::{Path, PathBuf};
use std::process::Command;
use crate::util::ToTitleCase;

pub(crate) fn install_plugin(
config: &Config,
Expand All @@ -15,6 +15,7 @@ pub(crate) fn install_plugin(
let plugin = &plugin.replace('-', "_");
let plugin_target_path = plugin_target_path(plugin).join(format!("{plugin}.plugin"));
let td_plugin_folder = &config.macos.plugin_folder;
std::fs::create_dir_all(&td_plugin_folder).context("Could not create plugin directory")?;
println!(
"Installing plugin {:?} to {}",
plugin_target_path, td_plugin_folder
Expand Down Expand Up @@ -161,4 +162,4 @@ fn write_xcodeproj(
);
std::fs::write(path, project)?;
Ok(())
}
}

0 comments on commit 5149329

Please sign in to comment.