Skip to content
Browse files

do not normalize assets timestamp when asset_paths is empty

  • Loading branch information...
1 parent e82de1c commit da488951fe3f7420892dd64288e8ea22a1d751ff @mhorbul committed Jul 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/capistrano/recipes/deploy.rb
View
2 lib/capistrano/recipes/deploy.rb
@@ -256,7 +256,7 @@ def try_runner(*args)
if fetch(:normalize_asset_timestamps, true)
stamp = Time.now.utc.strftime("%Y%m%d%H%M.%S")
asset_paths = fetch(:public_children, %w(images stylesheets javascripts)).map { |p| "#{latest_release}/public/#{p}" }.join(" ")
- run "find #{asset_paths} -exec touch -t #{stamp} {} ';'; true", :env => { "TZ" => "UTC" }
+ run("find #{asset_paths} -exec touch -t #{stamp} {} ';'; true", :env => { "TZ" => "UTC" }) if asset_paths.any?
end
end

0 comments on commit da48895

Please sign in to comment.
Something went wrong with that request. Please try again.