Skip to content

Loading…

"touch -c" now runs in slices of 100 (instead of 1000) #49

Merged
merged 1 commit into from

4 participants

@sibblingz

We got a "Argument list too long" error during deployment, because our deploy-to path is quite lengthy. Ideally, this list should be sized by character count and not file count, but this will do for now.

@tuttinator

+1 Awesome - thanks for that. I just ran into that issue now.

@ndbroadbent ndbroadbent merged commit ad9b681 into ndbroadbent:master

1 check passed

Details default The Travis build passed
@ndbroadbent
Owner

Great, thanks! Have released this change in 0.3.6

@tuttinator

Wow - thanks, amazingly fast response.

@sibblingz

+1 that, very quick! I can get rid of my fork now.

@ahoward

yuk. why not simply

  FileUtils.touch(paths.select{|path| test(?e, path)})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 10, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/turbo-sprockets/tasks/assets.rake
View
2 lib/turbo-sprockets/tasks/assets.rake
@@ -76,7 +76,7 @@ namespace :assets do
if digest.nil?
::Rails.logger.debug "Updating mtimes for current assets..."
paths = known_assets.map { |asset| File.join(target, asset) }
- paths.each_slice(1000) do |slice|
+ paths.each_slice(100) do |slice|
# File.utime raises 'Operation not permitted' unless user is owner of file.
# Non-owners have permission to update mtime to the current time using 'touch'.
`touch -c #{slice.shelljoin}`
Something went wrong with that request. Please try again.