Execute the command passed with pecl

def _pecl(command, defaults=False):
    '''
    Execute the command passed with pecl
    '''
    cmdline = 'pecl {0}'.format(command)
    if salt.utils.data.is_true(defaults):
        cmdline = 'yes ' "''" + ' | ' + cmdline

    ret = __salt__['cmd.run_all'](cmdline, python_shell=True)

    if ret['retcode'] == 0:
        return ret['stdout']
    else:
        log.error('Problem running pecl. Is php-pear installed?')
        return ''