From 65256b110b59cad97c4f3285e06e3b42f57065e0 Mon Sep 17 00:00:00 2001 From: Sourajyoti Basak Date: Tue, 17 Jan 2023 03:05:54 +0530 Subject: [PATCH] feat(pacstall): add `-y` flag variant (#312) --- src/steps/os/linux.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/steps/os/linux.rs b/src/steps/os/linux.rs index 1c6fc723..d54b9f9a 100644 --- a/src/steps/os/linux.rs +++ b/src/steps/os/linux.rs @@ -431,8 +431,16 @@ pub fn run_pacstall(ctx: &ExecutionContext) -> Result<()> { print_separator("Pacstall"); - ctx.run_type().execute(&pacstall).arg("-U").status_checked()?; - ctx.run_type().execute(pacstall).arg("-Up").status_checked() + let mut update_cmd = ctx.run_type().execute(&pacstall); + let mut upgrade_cmd = ctx.run_type().execute(pacstall); + + if ctx.config().yes(Step::Pacstall) { + update_cmd.arg("-P"); + upgrade_cmd.arg("-P"); + } + + update_cmd.arg("-U").status_checked()?; + upgrade_cmd.arg("-Up").status_checked() } fn upgrade_clearlinux(ctx: &ExecutionContext) -> Result<()> {