Execution Context
This commit is contained in:
committed by
GitHub
parent
fb5cf5c176
commit
c716b68e9c
@@ -1,4 +1,5 @@
|
||||
use crate::error::{SkipStep, TopgradeError};
|
||||
use crate::execution_context::ExecutionContext;
|
||||
use crate::executor::{CommandExt, RunType};
|
||||
use crate::terminal::{print_separator, shell};
|
||||
use crate::utils::{self, PathExt};
|
||||
@@ -166,9 +167,9 @@ pub fn run_myrepos_update(base_dirs: &BaseDirs, run_type: RunType) -> Result<()>
|
||||
.check_run()
|
||||
}
|
||||
|
||||
pub fn run_custom_command(name: &str, command: &str, run_type: RunType) -> Result<()> {
|
||||
pub fn run_custom_command(name: &str, command: &str, ctx: &ExecutionContext) -> Result<()> {
|
||||
print_separator(name);
|
||||
run_type.execute(shell()).arg("-c").arg(command).check_run()
|
||||
ctx.run_type().execute(shell()).arg("-c").arg(command).check_run()
|
||||
}
|
||||
|
||||
pub fn run_composer_update(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user