mirror of
https://github.com/pesde-pkg/pesde.git
synced 2025-04-07 12:20:54 +01:00
20 lines
489 B
Rust
20 lines
489 B
Rust
use crate::cli::{home_dir, update_scripts_folder};
|
|
use anyhow::Context;
|
|
use clap::Args;
|
|
use pesde::Project;
|
|
use std::fs::create_dir_all;
|
|
|
|
#[derive(Debug, Args)]
|
|
pub struct SelfInstallCommand {}
|
|
|
|
impl SelfInstallCommand {
|
|
pub fn run(self, project: Project) -> anyhow::Result<()> {
|
|
update_scripts_folder(&project)?;
|
|
|
|
create_dir_all(home_dir()?.join("bin")).context("failed to create bin folder")?;
|
|
|
|
// TODO: add the bin folder to the PATH
|
|
|
|
Ok(())
|
|
}
|
|
}
|