Skip to content

Commit

Permalink
Update the error message to be more informative
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamMcCumstie committed Mar 20, 2019
1 parent 21d4e6f commit 0de836d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/cloudware/models/deployment_callbacks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ def self.included(base)

def validate_template_exists
return if File.exist?(template_path)
errors.add(:template, "No such template: #{template_path}")
if template_path.empty?
errors.add(:template, 'Failed to resolve the template')
else
errors.add(:template, "No such template: #{template_path}")
end
end

def validate_replacement_tags
Expand Down

0 comments on commit 0de836d

Please sign in to comment.