Skip to content

Commit 1dc1c5c

Browse files
committed
fix: explicitly cast the platform string to a Gem::Platform
to work around rubygems/rubygems#5938 Closes #200
1 parent 15dbf2a commit 1dc1c5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/tailwindcss/commands.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ def platform
1818
def executable(
1919
exe_path: File.expand_path(File.join(__dir__, "..", "..", "exe"))
2020
)
21-
if Tailwindcss::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match(p) }
21+
if Tailwindcss::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match(Gem::Platform.new(p)) }
2222
raise UnsupportedPlatformException, <<~MESSAGE
2323
tailwindcss-rails does not support the #{platform} platform
2424
Please install tailwindcss following instructions at https://tailwindcss.com/docs/installation
2525
MESSAGE
2626
end
2727

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

3232
if exe_path.nil?

0 commit comments

Comments
 (0)