Package: desktop-file-utils
Version: 0.22-1

The bash_completion scriptlet for desktop-file-validate does 
not check if the variable "filenames" is unset.  This 
results in a warning if running in a shell with "set -u".

One way to replicate the problem is to have "set -u" in 
one's ~/.bashrc, then log in through ssh.  There will be an 
error message "-bash: filenames: unbound variable" 
immediately after the MOTD.

The attached patch fixes the problem.
diff --git a/debian/desktop-file-validate b/debian/desktop-file-validate
index 8034dce..9ec20eb 100644
--- a/debian/desktop-file-validate
+++ b/debian/desktop-file-validate
@@ -9,4 +9,4 @@ _desktop_file_validate()
 	cur=${COMP_WORDS[COMP_CWORD]}
 	_filedir '@(desktop)'
 }
-[ "${have:-}" ] && complete -F _desktop_file_validate $filenames desktop-file-validate
+[ "${have:-}" ] && complete -F _desktop_file_validate ${filenames:-} desktop-file-validate

Reply via email to