Skip to content

Commit

Permalink
Better error reporting if no dependencies are specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Aug 28, 2013
1 parent 555c9d3 commit 04f22aa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions teapot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,20 @@ def scope_for_namespace(namespace)
end

define_generator "xcode-config" do |generator|
generator.description = <<-EOF
Generate appropriate .xcconfig files for use within Xcode.
usage: teapot generate xcode-config [dependencies]
EOF

generator.generate do |*dependency_names|
chain = context.dependency_chain(dependency_names)
ordered = context.direct_targets(chain.ordered)

if ordered.size == 0
raise GeneratorError.new("Empty dependency list, please specify dependencies.", generator)
end

environment = ordered.last[0].environment_for_configuration(context.configuration)

substitutions = Substitutions.new
Expand Down

0 comments on commit 04f22aa

Please sign in to comment.