refactor: run git through the same layer as everything else
This commit is contained in:
13
src/main.rs
13
src/main.rs
@@ -67,9 +67,9 @@ fn run(ctx: &Ctx, command: cli::Commands) -> Result<ExitCode> {
|
||||
paths,
|
||||
force,
|
||||
store,
|
||||
} => scripts::link::add(&paths, force, store.root.as_deref()).map(|()| done),
|
||||
} => scripts::link::add(ctx, &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)
|
||||
scripts::link::restore(ctx, &paths, all, store.root.as_deref()).map(|()| done)
|
||||
}
|
||||
// the one command with something to say through its exit code
|
||||
cli::Link::Check {
|
||||
@@ -78,7 +78,14 @@ fn run(ctx: &Ctx, command: cli::Commands) -> Result<ExitCode> {
|
||||
null,
|
||||
exit_code,
|
||||
store,
|
||||
} => scripts::link::check(&paths, porcelain, null, exit_code, store.root.as_deref()),
|
||||
} => scripts::link::check(
|
||||
ctx,
|
||||
&paths,
|
||||
porcelain,
|
||||
null,
|
||||
exit_code,
|
||||
store.root.as_deref(),
|
||||
),
|
||||
},
|
||||
cli::Commands::Completions { shell } => {
|
||||
scripts::completions::completions(shell)?;
|
||||
|
||||
Reference in New Issue
Block a user