vcpkg suppport (fix #81)
This commit is contained in:
@@ -161,6 +161,22 @@ pub fn run_opam_update(terminal: &mut Terminal, dry_run: bool) -> Option<(&'stat
|
||||
None
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn run_vcpkg_update(terminal: &mut Terminal, dry_run: bool) -> Option<(&'static str, bool)> {
|
||||
if let Some(vcpkg) = utils::which("vcpkg") {
|
||||
terminal.print_separator("vcpkg");
|
||||
|
||||
let success = || -> Result<(), Error> {
|
||||
Executor::new(&vcpkg, dry_run).args(&["upgrade", "--no-dry-run"]).spawn()?.wait()?.check()?;
|
||||
Ok(())
|
||||
}().is_ok();
|
||||
|
||||
return Some(("vcpkg", success));
|
||||
}
|
||||
|
||||
None
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn run_pipx_update(terminal: &mut Terminal, dry_run: bool) -> Option<(&'static str, bool)> {
|
||||
if let Some(pipx) = utils::which("pipx") {
|
||||
|
||||
@@ -322,6 +322,10 @@ fn run() -> Result<(), Error> {
|
||||
|terminal| generic::run_opam_update(terminal, opt.dry_run),
|
||||
&mut execution_context,
|
||||
)?);
|
||||
report.push_result(execute(
|
||||
|terminal| generic::run_vcpkg_update(terminal, opt.dry_run),
|
||||
&mut execution_context,
|
||||
)?);
|
||||
report.push_result(execute(
|
||||
|terminal| generic::run_pipx_update(terminal, opt.dry_run),
|
||||
&mut execution_context,
|
||||
|
||||
Reference in New Issue
Block a user