Skip to content

Commit

Permalink
rake locale:plugin:find -- print nice error for non-existent plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mzazrivec committed Aug 13, 2018
1 parent 787a554 commit 2dbaebd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/tasks/locale.rake
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,12 @@ namespace :locale do
exit 1
end
@domain = args[:engine].gsub('::', '_')
@engine = "#{args[:engine].camelize}::Engine".constantize
begin
@engine = "#{args[:engine].camelize}::Engine".constantize
rescue NameError
warn "The specified plugin #{args[:engine]} does not exist."
exit 1
end
@engine_root = @engine.root

# extract plugin's yaml strings
Expand Down

0 comments on commit 2dbaebd

Please sign in to comment.