before index-conflict changes
This commit is contained in:
29
src/utils/command_handler/link.rs
Normal file
29
src/utils/command_handler/link.rs
Normal file
@ -0,0 +1,29 @@
|
||||
use crate::commands;
|
||||
|
||||
pub fn link(matches: &clap::ArgMatches) {
|
||||
let repo = matches.get_one::<String>("repo").unwrap();
|
||||
let pkgname = matches.get_one::<String>("pkgname").unwrap();
|
||||
|
||||
match commands::link::link(&repo, &pkgname) {
|
||||
Ok(_) => println!("link completed successfully."),
|
||||
Err(e) => eprintln!("Error during link: {}", e),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pub fn command() -> clap::Command {
|
||||
clap::Command::new("link")
|
||||
.about("Create package links and mount overlays")
|
||||
.arg(
|
||||
clap::Arg::new("repo")
|
||||
.help("Repository name")
|
||||
.required(true)
|
||||
.index(1),
|
||||
)
|
||||
.arg(
|
||||
clap::Arg::new("pkgname")
|
||||
.help("Package name")
|
||||
.required(true)
|
||||
.index(2),
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user