Update package.sh

This commit is contained in:
spiritLHLS 2022-12-18 13:04:17 +08:00 committed by GitHub
parent d8e6fcaa79
commit 5c46f0dd56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -283,7 +283,7 @@ check_eol_and_switch_apt_source() {
fix_broken() {
# Check if the output of the update contains "--fix-broken install"
if apt update | grep -E '--fix-broken.*install'; then
if apt update | grep -F -- '--fix-broken' | grep -F -- 'install'; then
# If it does, run apt --fix-broken install -y
apt --fix-broken install -y
apt update