In case no file in dir, still an empty string will be read, which matches [[:digit:]]* (but won't with +)

This commit is contained in:
Alexandre Aubin 2019-02-26 00:59:31 +01:00
parent 990eeb76e1
commit ac6f24671c

View file

@ -25,7 +25,7 @@ ynh_wait_dpkg_free() {
while read dpkg_file <&9 while read dpkg_file <&9
do do
# Check if the name of this file contains only numbers. # Check if the name of this file contains only numbers.
if echo "$dpkg_file" | grep -Pq "^[[:digit:]]*$" if echo "$dpkg_file" | grep -Pq "^[[:digit:]]+$"
then then
# If so, that a remaining of dpkg. # If so, that a remaining of dpkg.
ynh_print_err "E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem." ynh_print_err "E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem."