mirror of
https://github.com/ViViDboarder/abuse-the-force.git
synced 2024-12-03 17:36:53 +00:00
Improve error messages
This commit is contained in:
parent
53bbf5ab20
commit
3820d1ecd9
@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
||||
|
||||
s.add_dependency 'thor', '~> 0.16.0'
|
||||
s.add_dependency 'listen', '~> 0.6.0'
|
||||
s.add_dependency 'metaforce', '~> 1.0.7'
|
||||
s.add_dependency 'metaforce', '>= 1.0.7'
|
||||
s.add_dependency 'highline'
|
||||
|
||||
s.add_development_dependency 'rake'
|
||||
|
@ -182,19 +182,23 @@ module AbuseTheForce
|
||||
# If a failed deploy, print errors
|
||||
if result.success == false
|
||||
|
||||
puts "DEPLOY ERRORS: #{result.messages.reject { |m| m.success }.size}"
|
||||
if result.messages.any?
|
||||
puts "DEPLOY ERRORS: #{result.messages.reject { |m| m.success }.size}"
|
||||
|
||||
result.messages.each do |m|
|
||||
result.messages.each do |m|
|
||||
|
||||
# If the path is not from the project, fix it
|
||||
unless m.file_name.starts_with? Atf_Config.src
|
||||
m.file_name = m.file_name.sub(/[a-zA-Z._-]*\//, Atf_Config.src + '/')
|
||||
end
|
||||
|
||||
# Print our error in the format "filename:line:column type in object message"
|
||||
if !m.success
|
||||
puts "#{m.file_name}:#{m.line_number}:#{m.column_number} #{m.problem_type} in #{m.full_name} #{m.problem}"
|
||||
# If the path is not from the project, fix it
|
||||
unless m.file_name.starts_with? Atf_Config.src
|
||||
m.file_name = m.file_name.sub(/[a-zA-Z._-]*\//, Atf_Config.src + '/')
|
||||
end
|
||||
|
||||
# Print our error in the format "filename:line:column type in object message"
|
||||
if !m.success
|
||||
puts "#{m.file_name}:#{m.line_number}:#{m.column_number} #{m.problem_type} in #{m.full_name} #{m.problem}"
|
||||
end
|
||||
end
|
||||
else
|
||||
puts "DEPLOY ERRORS: UKNOWN"
|
||||
end
|
||||
end # success == false
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user