Skip to content
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

fix: name the platform using just architecture and os #103

Merged
merged 1 commit into from
Dec 20, 2021
Merged
Changes from all commits
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
7 changes: 4 additions & 3 deletions exe/tailwindcss
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ require "shellwords"
require "tailwindcss/upstream"

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

if supported_platforms.none? { |supported_platform| Gem::Platform.match(supported_platform) }
STDERR.puts(<<~ERRMSG)
ERROR: tailwindcss-rails does not support the #{::Gem::Platform.local} platform
ERROR: tailwindcss-rails does not support the #{platform} platform
Please install tailwindcss following instructions at https://tailwindcss.com/docs/installation
ERRMSG
exit 1
Expand All @@ -19,15 +20,15 @@ exe_path = Dir.glob(File.join(__dir__, "*", "tailwindcss")).find do |f|
end
if exe_path.nil?
STDERR.puts(<<~ERRMSG)
ERROR: Cannot find the tailwindcss executable for #{::Gem::Platform.local} in #{__dir__}
ERROR: Cannot find the tailwindcss executable for #{platform} in #{__dir__}
If you're using bundler, please make sure you're on the latest bundler version:

gem install bundler
bundle update --bundler

Then make sure your lock file includes this platform by running:

bundle lock --add-platform #{::Gem::Platform.local}
bundle lock --add-platform #{platform}
bundle install

See `bundle lock --help` output for details.
Expand Down