From 9023942a857a22a51d63db6f9288a55e5e4c04e1 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Mon, 25 Oct 2021 21:33:58 +0300 Subject: [PATCH] Pacstall (fix #764) (#769) --- src/config.rs | 1 + src/main.rs | 1 + src/steps/os/linux.rs | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/src/config.rs b/src/config.rs index 84219fec..d08ac0d2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -95,6 +95,7 @@ pub enum Step { Nix, Node, Opam, + Pacstall, Pearl, Pipx, Pip3, diff --git a/src/main.rs b/src/main.rs index fea56d60..7f2c7af7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -326,6 +326,7 @@ fn run() -> Result<()> { { runner.execute(Step::Flatpak, "Flatpak", || linux::flatpak_update(&ctx))?; runner.execute(Step::Snap, "snap", || linux::run_snap(sudo.as_ref(), run_type))?; + runner.execute(Step::Pacstall, "pacstall", || linux::run_pacstall(&ctx))?; } #[cfg(target_os = "macos")] diff --git a/src/steps/os/linux.rs b/src/steps/os/linux.rs index 972be62a..d51ed6c1 100644 --- a/src/steps/os/linux.rs +++ b/src/steps/os/linux.rs @@ -411,6 +411,15 @@ fn upgrade_solus(ctx: &ExecutionContext) -> Result<()> { Ok(()) } +pub fn run_pacstall(ctx: &ExecutionContext) -> Result<()> { + let pacstall = require("pacstall")?; + ctx.run_type() + .execute(pacstall) + .arg("-Up") + .args(ctx.config().yay_arguments().split_whitespace()) + .check_run() +} + fn upgrade_clearlinux(ctx: &ExecutionContext) -> Result<()> { if let Some(sudo) = &ctx.sudo() { ctx.run_type()