use eyre::ContextCompat;
use std::path::Path;
mod c;
mod cxx;
mod python;
mod rust;
fn workspace_dir() -> eyre::Result<&'static str> {
Path::new(env!("CARGO_MANIFEST_DIR"))
.parent()
.context("Could not get manifest parent folder")?
.parent()
.context("Could not get manifest grandparent folder")?
.to_str()
.context("dora workspace path is not valid UTF-8")
}
pub fn create(args: crate::CommandNew, use_path_deps: bool) -> eyre::Result<()> {
match args.lang {
crate::Lang::Rust => rust::create(args, use_path_deps),
crate::Lang::Python => python::create(args, use_path_deps),
crate::Lang::C => c::create(args, use_path_deps),
crate::Lang::Cxx => cxx::create(args, use_path_deps),
}
}