fix: checkfile set even if tuple is not a expression (fixes #51)

This commit is contained in:
oddlama 2022-09-28 17:55:13 +02:00
parent 1975f75d02
commit 7b9586ad30
No known key found for this signature in database
GPG Key ID: 14EFE510775FE39A
1 changed files with 3 additions and 1 deletions

View File

@ -377,7 +377,9 @@ function check_wanted_programs() {
local checkfile
for tuple in "$@"; do
program="${tuple%%=*}"
checkfile="${tuple##*=}"
checkfile=""
[[ "$tuple" == *=* ]] \
checkfile="${tuple##*=}"
if ! has_program "${program#"?"}" "$checkfile"; then
if [[ "$program" == "?"* ]]; then
missing_wanted+=("${program#"?"}")