Skip to content

ci: try to reproduce the musl issue from #200 #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 19, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: explicitly cast the platform string to a Gem::Platform
to work around rubygems/rubygems#5938

Closes #200
  • Loading branch information
flavorjones committed Sep 19, 2022
commit 1dc1c5cf9aef03cb5047090adc41f2e5caf60d28
4 changes: 2 additions & 2 deletions lib/tailwindcss/commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ def platform
def executable(
exe_path: File.expand_path(File.join(__dir__, "..", "..", "exe"))
)
if Tailwindcss::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match(p) }
if Tailwindcss::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match(Gem::Platform.new(p)) }
raise UnsupportedPlatformException, <<~MESSAGE
tailwindcss-rails does not support the #{platform} platform
Please install tailwindcss following instructions at https://tailwindcss.com/docs/installation
MESSAGE
end

exe_path = Dir.glob(File.expand_path(File.join(exe_path, "*", "tailwindcss"))).find do |f|
Gem::Platform.match(File.basename(File.dirname(f)))
Gem::Platform.match(Gem::Platform.new(File.basename(File.dirname(f))))
end

if exe_path.nil?
Expand Down