do pacman -Sy before each build

This commit is contained in:
lukas-heiligenbrunner 2024-01-07 20:29:12 +01:00
parent bd3b04b6a5
commit e74a9607a3

View File

@ -11,6 +11,15 @@ pub async fn build_pkgbuild(
pkg_name: &str,
tx: Sender<String>,
) -> anyhow::Result<String> {
let mut child = tokio::process::Command::new("pacman")
.args([
"-Sy",
])
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.spawn()?;
child.wait().await?;
let makepkg = include_str!("../../scripts/makepkg");
// Create a temporary file to store the bash script content