feat: take the store root as an option
This commit is contained in:
13
src/main.rs
13
src/main.rs
@@ -53,15 +53,22 @@ fn run(command: cli::Commands) -> Result<ExitCode> {
|
||||
Ok(done)
|
||||
}
|
||||
cli::Commands::Link { command } => match command {
|
||||
cli::Link::Add { paths, force } => scripts::link::add(&paths, force).map(|()| done),
|
||||
cli::Link::Restore { paths, all } => scripts::link::restore(&paths, all).map(|()| done),
|
||||
cli::Link::Add {
|
||||
paths,
|
||||
force,
|
||||
store,
|
||||
} => scripts::link::add(&paths, force, store.root.as_deref()).map(|()| done),
|
||||
cli::Link::Restore { paths, all, store } => {
|
||||
scripts::link::restore(&paths, all, store.root.as_deref()).map(|()| done)
|
||||
}
|
||||
// the one command with something to say through its exit code
|
||||
cli::Link::Check {
|
||||
paths,
|
||||
porcelain,
|
||||
null,
|
||||
exit_code,
|
||||
} => scripts::link::check(&paths, porcelain, null, exit_code),
|
||||
store,
|
||||
} => scripts::link::check(&paths, porcelain, null, exit_code, store.root.as_deref()),
|
||||
},
|
||||
cli::Commands::Completions { shell } => {
|
||||
scripts::completions::completions(shell)?;
|
||||
|
||||
Reference in New Issue
Block a user