mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 23:07:28 +08:00
FIX: rake assets:precompile should be re-runnable
This commit is contained in:
@ -117,7 +117,7 @@ end
|
|||||||
|
|
||||||
if ENV['COMPRESS_BROTLI']&.to_i == 1
|
if ENV['COMPRESS_BROTLI']&.to_i == 1
|
||||||
# different brotli versions use different parameters
|
# different brotli versions use different parameters
|
||||||
ver_out, ver_err, ver_status = Open3.capture3('brotli --version')
|
ver_out, _ver_err, ver_status = Open3.capture3('brotli --version')
|
||||||
if !ver_status.success?
|
if !ver_status.success?
|
||||||
# old versions of brotli don't respond to --version
|
# old versions of brotli don't respond to --version
|
||||||
def brotli_command(path)
|
def brotli_command(path)
|
||||||
@ -125,7 +125,7 @@ if ENV['COMPRESS_BROTLI']&.to_i == 1
|
|||||||
end
|
end
|
||||||
elsif ver_out >= "brotli 1.0.0"
|
elsif ver_out >= "brotli 1.0.0"
|
||||||
def brotli_command(path)
|
def brotli_command(path)
|
||||||
"brotli --quality=11 #{path} --output=#{path}.br"
|
"brotli -f --quality=11 #{path} --output=#{path}.br"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
# not sure what to do here, not expecting this
|
# not sure what to do here, not expecting this
|
||||||
|
Reference in New Issue
Block a user