Skip to content

Commit

Permalink
fix rescuing LoadError twice
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmeurer authored and glebm committed Jan 5, 2024
1 parent cf24341 commit 0532717
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ task :debug do
begin
require 'dartsass-ruby'
rescue LoadError
require 'sassc'
rescue LoadError
raise LoadError.new("bootstrap-rubygem requires a Sass engine. Please add dartsass-sprockets or sassc-rails to your dependencies.")
begin
require 'sassc'
rescue LoadError
raise LoadError.new("bootstrap-rubygem requires a Sass engine. Please add dartsass-sprockets or sassc-rails to your dependencies.")
end
end
require './lib/bootstrap'
require 'term/ansicolor'
Expand Down
8 changes: 5 additions & 3 deletions lib/bootstrap/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
begin
require 'dartsass-sprockets'
rescue LoadError
require 'sassc-rails'
rescue LoadError
raise LoadError.new("bootstrap-rubygem requires a Sass engine. Please add dartsass-sprockets or sassc-rails to your dependencies.")
begin
require 'sassc-rails'
rescue LoadError
raise LoadError.new("bootstrap-rubygem requires a Sass engine. Please add dartsass-sprockets or sassc-rails to your dependencies.")
end
end

module Bootstrap
Expand Down

0 comments on commit 0532717

Please sign in to comment.