Skip to content

Commit

Permalink
Run broken rubygems detection only on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed May 7, 2024
1 parent 2369cf8 commit 30ebf71
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ext/sass/Rakefile
Expand Up @@ -50,8 +50,7 @@ file 'cli.rb' => %w[dart-sass] do |t|
"
end

File.write(t.name, <<~CLI_RB)
# frozen_string_literal: true
validate_gemspec = <<~'VALIDATE_GEMSPEC'
spec = Gem.loaded_specs['sass-embedded']
platform = spec&.platform
Expand All @@ -66,10 +65,14 @@ file 'cli.rb' => %w[dart-sass] do |t|
else
"running 'gem install sass-embedded'"
end
raise LoadError, "The gemspec for \#{spec.name} at \#{spec.loaded_from} was broken. " \\
"Try \#{update}, and then try \#{install} to reinstall."
raise LoadError, "The gemspec for #{spec.name} at #{spec.loaded_from} was broken. " \
"Try #{update}, and then try #{install} to reinstall."
end
VALIDATE_GEMSPEC

File.write(t.name, <<~CLI_RB)
# frozen_string_literal: true
#{validate_gemspec if SassConfig.gem_platform.os == 'linux'}
module Sass
module CLI
COMMAND = [#{command}].freeze
Expand Down

0 comments on commit 30ebf71

Please sign in to comment.