mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Sprockets::Context takes a Pathname for its third argument
As far as I can tell, sprockets has always expected the third argument to be a
`Pathname` object. Not sure what actually changed and why it was working before,
but it now throws a `NoMethodError` for `dirname` on `String` in
`Context#resolve`
# , not sure why this was working before
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
require_dependency 'sass/discourse_sass_importer'
|
||||
require 'pathname'
|
||||
|
||||
class DiscourseSassCompiler
|
||||
|
||||
@@ -41,7 +42,8 @@ class DiscourseSassCompiler
|
||||
env = env.instance_variable_get('@environment')
|
||||
end
|
||||
|
||||
context = env.context_class.new(env, "#{@target}.scss", "app/assets/stylesheets/#{@target}.scss")
|
||||
pathname = Pathname.new("app/assets/stylesheets/#{@target}.scss")
|
||||
context = env.context_class.new(env, "#{@target}.scss", pathname)
|
||||
|
||||
debug_opts = Rails.env.production? ? {} : {
|
||||
line_numbers: true,
|
||||
|
||||
Reference in New Issue
Block a user