Skip to content

Commit bc12aed

Browse files
authored
fix: name the platform using just architecture and os (#103)
1 parent 270ca32 commit bc12aed

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

exe/tailwindcss

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ require "shellwords"
55
require "tailwindcss/upstream"
66

77
supported_platforms = Tailwindcss::Upstream::NATIVE_PLATFORMS.keys
8+
platform = [:cpu, :os].map { |m| Gem::Platform.local.send(m) }.join("-")
89

910
if supported_platforms.none? { |supported_platform| Gem::Platform.match(supported_platform) }
1011
STDERR.puts(<<~ERRMSG)
11-
ERROR: tailwindcss-rails does not support the #{::Gem::Platform.local} platform
12+
ERROR: tailwindcss-rails does not support the #{platform} platform
1213
Please install tailwindcss following instructions at https://tailwindcss.com/docs/installation
1314
ERRMSG
1415
exit 1
@@ -19,15 +20,15 @@ exe_path = Dir.glob(File.join(__dir__, "*", "tailwindcss")).find do |f|
1920
end
2021
if exe_path.nil?
2122
STDERR.puts(<<~ERRMSG)
22-
ERROR: Cannot find the tailwindcss executable for #{::Gem::Platform.local} in #{__dir__}
23+
ERROR: Cannot find the tailwindcss executable for #{platform} in #{__dir__}
2324
If you're using bundler, please make sure you're on the latest bundler version:
2425
2526
gem install bundler
2627
bundle update --bundler
2728
2829
Then make sure your lock file includes this platform by running:
2930
30-
bundle lock --add-platform #{::Gem::Platform.local}
31+
bundle lock --add-platform #{platform}
3132
bundle install
3233
3334
See `bundle lock --help` output for details.

0 commit comments

Comments
 (0)