The following works in Ubuntu but not Yocto (Poky).
root@system:~/# x='abc'
root@system:~/# y=''
root@system:~/# [[ $(echo $x) != '' ]] && echo true
true
root@system:~/# [[ $(echo $y) != '' ]] && echo true
sh: : unknown operand
In Ubuntu the last line returns nothing (as expected). Any ideas why it's throwing an error in Yocto?