Permalink
Browse files

Merge pull request #237 from mhorbul/master

do not normalize assets timestamp when asset_paths is empty
  • Loading branch information...
2 parents dfb6295 + da48895 commit 026b3faab8a6b09161420911d15f7d8b0ce7483b @carsomyr carsomyr committed Jul 30, 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 026b3fa

Please sign in to comment.