Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Fix code for Android and selective yes #809

Merged
merged 1 commit into from
Dec 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/steps/os/android.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::execution_context::ExecutionContext;
use crate::terminal::print_separator;
use crate::utils::require;
use crate::Step;
use anyhow::Result;

pub fn upgrade_packages(ctx: &ExecutionContext) -> Result<()> {
Expand All @@ -10,7 +11,7 @@ pub fn upgrade_packages(ctx: &ExecutionContext) -> Result<()> {

let mut command = ctx.run_type().execute(&pkg);
command.arg("upgrade");
if ctx.config().yes() {
if ctx.config().yes(Step::System) {
command.arg("-y");
}
command.check_run()?;
Expand All @@ -21,7 +22,7 @@ pub fn upgrade_packages(ctx: &ExecutionContext) -> Result<()> {
let apt = require("apt")?;
let mut command = ctx.run_type().execute(&apt);
command.arg("autoremove");
if ctx.config().yes() {
if ctx.config().yes(Step::System) {
command.arg("-y");
}
command.check_run()?;
Expand Down