I mistakenly flagged this answer as spam. The flag was rejected. At first I tought the reason was that in first place the answer, on-topic or not, didn't refer to any paid software, but just to a bash script released under Public Domain license. But after a second look the answer even looked on-topic. So indeed the answer didn't qualify as spam, and that was my mistake. But it's unclear to me when exactly an explicitly self-promoting answer about free software qualifies as such. For some reason, people spam-promote free software as well: link for those who can see deleted questions and link for those who can't, and to be honest it's unclear to me why this happens. Now the linked question wasn't a question in first place, so there's no concern about whether it should have been deleted or not. But since similiar even tough not-so-explicit things might happen even in answers, this is something I feel I should be ready to handle, since such answers do not make up a high quality post.
So where do I draw the line and why? Should I limit myself to downvote the answer when it's not a good answer or should i flag it when it's too explicitly self-promoting?