10.2.0 release (#213)

This commit is contained in:
Thomas Schönauer
2022-11-23 15:18:09 +00:00
committed by GitHub
parent 6f48017761
commit 13076fcef6
43 changed files with 1576 additions and 884 deletions

View File

@@ -1,8 +1,10 @@
use crate::command::CommandExt;
use crate::execution_context::ExecutionContext;
use crate::terminal::print_separator;
use crate::utils::require;
use crate::utils::which;
use crate::Step;
use anyhow::Result;
use color_eyre::eyre::Result;
pub fn upgrade_packages(ctx: &ExecutionContext) -> Result<()> {
//let pkg = require("pkg")?;
@@ -10,7 +12,7 @@ pub fn upgrade_packages(ctx: &ExecutionContext) -> Result<()> {
print_separator("Termux Packages");
let is_nala = pkg.end_with("nala");
let is_nala = pkg.ends_with("nala");
let mut command = ctx.run_type().execute(&pkg);
command.arg("upgrade");
@@ -18,20 +20,18 @@ pub fn upgrade_packages(ctx: &ExecutionContext) -> Result<()> {
if ctx.config().yes(Step::System) {
command.arg("-y");
}
command.check_run()?;
command.status_checked()?;
if !is_nala {
if ctx.config().cleanup() {
ctx.run_type().execute(&pkg).arg("clean").check_run()?;
if !is_nala && ctx.config().cleanup() {
ctx.run_type().execute(&pkg).arg("clean").status_checked()?;
let apt = require("apt")?;
let mut command = ctx.run_type().execute(&apt);
command.arg("autoremove");
if ctx.config().yes(Step::System) {
command.arg("-y");
}
command.check_run()?;
let apt = require("apt")?;
let mut command = ctx.run_type().execute(&apt);
command.arg("autoremove");
if ctx.config().yes(Step::System) {
command.arg("-y");
}
command.status_checked()?;
}
Ok(())