refactor: run git through the same layer as everything else

This commit is contained in:
2026-09-08 11:57:45 +00:00
parent d7626d9f5e
commit bbbca755be
4 changed files with 219 additions and 82 deletions

View File

@@ -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)?;