Used -y option for apt-add-repository instead of piping "yes".
(thank you @bfontaine)