From 79d6ecf6b3740906a898731b799079f77061cdf1 Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Fri, 2 May 2025 15:41:23 +0800 Subject: [PATCH] =?UTF-8?q?linux-install-packages:=20=E5=84=AA=E5=8C=96?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=A5=97=E4=BB=B6=E5=BA=AB=E6=B8=85=E5=96=AE?= =?UTF-8?q?=E4=BD=9C=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../run_onchange_before_linux-install-packages.sh.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl b/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl index 052dc8e..9ec55ff 100644 --- a/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl +++ b/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl @@ -72,14 +72,14 @@ for package in "${pacmanForce_packages[@]}"; do to_install_pacmanForce+=("$package") done -sudo pacman -Sy - # 等待鎖定檔案被移除 wait_for_pacman_unlock if [[ ${#to_install_pacmanForce[@]} -gt 0 ]]; then echo " - Installing missing packages via pacman: ${to_install_pacmanForce[@]}" - sudo pacman -S --needed --noconfirm "${to_install_pacmanForce[@]}" + sudo pacman -Sy --needed --noconfirm "${to_install_pacmanForce[@]}" +else + sudo pacman -Sy fi # 等待鎖定檔案被移除