Fix crash when package_add_command is missing.

When using packages promise and not defining 'package_add_command'
agent crashes. This fixes crash.