Skip to content

Commit

Permalink
cnf: Quote the arguments passed to pk-command-not-found
Browse files Browse the repository at this point in the history
"$@" is a special variable in bash that expands to all the positional
parameters properly quoted. Essentially it means that any parameters
with spaces will be passed correctly as a single argument.

Signed-off-by: Richard Hughes <richard@hughsie.com>
  • Loading branch information
dbnicholson authored and hughsie committed Apr 5, 2014
1 parent de08794 commit b8f5de2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/command-not-found/PackageKit.sh.in
Expand Up @@ -18,7 +18,7 @@ command_not_found_handle () {

# run the command, or just print a warning
if [ $runcnf -eq 1 ]; then
@LIBEXECDIR@/pk-command-not-found $@
@LIBEXECDIR@/pk-command-not-found "$@"
retval=$?
else
echo "bash: $1: command not found"
Expand Down

0 comments on commit b8f5de2

Please sign in to comment.