Skip to content
Closed
Show file tree
Hide file tree
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
Next Next commit
More fixes
  • Loading branch information
bopm committed Apr 7, 2025
commit 8bb73e8a07e14e1456db3f3036ea63c52c4f3b36
10 changes: 6 additions & 4 deletions lib/tailwindcss/commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ def rails_root
end

def remove_tempfile!
if class_variable_defined?(:@@tempfile) && @@tempfile
@@tempfile.unlink if File.exist?(@@tempfile.path)
remove_class_variable(:@@tempfile)
end
return unless class_variable_defined?(:@@tempfile) && @@tempfile

@@tempfile.close unless @@tempfile.closed?
@@tempfile.unlink if File.exist?(@@tempfile.path)
remove_class_variable(:@@tempfile)
end

def compile_command(input: application_css, debug: false, **kwargs)
Expand Down Expand Up @@ -67,6 +68,7 @@ def rails_css_compressor?

def engines_roots
return [] unless defined?(Rails)
return [] unless Rails.application&.config&.tailwindcss_rails&.engines

Rails::Engine.descendants.select do |engine|
engine.engine_name.in?(Rails.application.config.tailwindcss_rails.engines)
Expand Down
Loading