Commit e1ab2c04 authored by Eloy Durán's avatar Eloy Durán

[SourcesManager] Print `repo add` output.

This is a temporary hack, do we need to formalize this and how?
parent 99d831e8
......@@ -36,12 +36,17 @@ module Pod
def find_or_create_source_with_url(url)
unless source = source_with_url(url)
name = name_for_url(url)
# Hack to ensure that `repo add` output is shown.
previous_title_level = UI.title_level
UI.title_level = 0
begin
Command::Repo::Add.new(CLAide::ARGV.new([name, url])).run
rescue Informative => e
raise Informative, "Unable to add a source with url `#{url}` " \
"named `#{name}`.\nYou can add it manually via " \
"`pod repo add NAME #{url}`."
ensure
UI.title_level = previous_title_level
end
source = source_with_url(url)
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment