mirror of
https://github.com/ViViDboarder/abuse-the-force.git
synced 2024-12-04 08:36:54 +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 'thor', '~> 0.16.0'
|
||||||
s.add_dependency 'listen', '~> 0.6.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_dependency 'highline'
|
||||||
|
|
||||||
s.add_development_dependency 'rake'
|
s.add_development_dependency 'rake'
|
||||||
|
@ -182,19 +182,23 @@ module AbuseTheForce
|
|||||||
# If a failed deploy, print errors
|
# If a failed deploy, print errors
|
||||||
if result.success == false
|
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
|
# If the path is not from the project, fix it
|
||||||
unless m.file_name.starts_with? Atf_Config.src
|
unless m.file_name.starts_with? Atf_Config.src
|
||||||
m.file_name = m.file_name.sub(/[a-zA-Z._-]*\//, Atf_Config.src + '/')
|
m.file_name = m.file_name.sub(/[a-zA-Z._-]*\//, Atf_Config.src + '/')
|
||||||
end
|
end
|
||||||
|
|
||||||
# Print our error in the format "filename:line:column type in object message"
|
# Print our error in the format "filename:line:column type in object message"
|
||||||
if !m.success
|
if !m.success
|
||||||
puts "#{m.file_name}:#{m.line_number}:#{m.column_number} #{m.problem_type} in #{m.full_name} #{m.problem}"
|
puts "#{m.file_name}:#{m.line_number}:#{m.column_number} #{m.problem_type} in #{m.full_name} #{m.problem}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
puts "DEPLOY ERRORS: UKNOWN"
|
||||||
end
|
end
|
||||||
end # success == false
|
end # success == false
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user