Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

if no public path, don't do anything

  • Loading branch information...
commit 023d8f755dc3b540e191dd864f4281e0231511ab 1 parent 3a1999a
@jystewart jystewart authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/cdn_helpers/cdn_helpers.rake
View
10 lib/cdn_helpers/cdn_helpers.rake
@@ -5,10 +5,12 @@ namespace :cdn do
require 'pathname'
public_root_path = Pathname.new('public').realpath
- FileList['public/**/*.css'].each do |css_file_path|
- css_file_path = Pathname.new(css_file_path).realpath
- public_path = Rails.root.join('public')
- CdnHelpers::CssRewriter.rewrite_css_file(css_file_path, public_path)
+ if File.exists?(public_root_path)
+ FileList['public/**/*.css'].each do |css_file_path|
+ css_file_path = Pathname.new(css_file_path).realpath
+ public_path = Rails.root.join('public')
+ CdnHelpers::CssRewriter.rewrite_css_file(css_file_path, public_path)
+ end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.