Permalink
Browse files

if no public path, don't do anything

  • Loading branch information...
1 parent 3a1999a commit 023d8f755dc3b540e191dd864f4281e0231511ab @jystewart jystewart committed Apr 14, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 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

0 comments on commit 023d8f7

Please sign in to comment.