refactor: make all step functions take &ExectutionContext (#436)

This commit is contained in:
SteveLauC
2023-05-25 15:09:23 +08:00
committed by GitHub
parent c20a300eea
commit 76c39edc8b
14 changed files with 193 additions and 186 deletions

View File

@@ -4,7 +4,7 @@ use crate::HOME_DIR;
use color_eyre::eyre::Result;
use etcetera::base_strategy::BaseStrategy;
use crate::executor::{Executor, ExecutorOutput, RunType};
use crate::executor::{Executor, ExecutorOutput};
use crate::terminal::print_separator;
use crate::{
execution_context::ExecutionContext,
@@ -141,10 +141,10 @@ pub fn upgrade_neovim(ctx: &ExecutionContext) -> Result<()> {
)
}
pub fn run_voom(run_type: RunType) -> Result<()> {
pub fn run_voom(ctx: &ExecutionContext) -> Result<()> {
let voom = require("voom")?;
print_separator("voom");
run_type.execute(voom).arg("update").status_checked()
ctx.run_type().execute(voom).arg("update").status_checked()
}