Skip to content
Browse files

don't require git on the system for the gemspec

  • Loading branch information...
1 parent 93e7b44 commit fccbb0b50666fe12be3fad93cf71ec0ad1e08642 @mislav committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 will_paginate.gemspec
View
3 will_paginate.gemspec
@@ -17,5 +17,6 @@ Gem::Specification.new do |s|
s.rdoc_options = ['--main', 'README.rdoc', '--charset=UTF-8']
s.extra_rdoc_files = ['README.rdoc', 'LICENSE', 'CHANGELOG.rdoc']
- s.files = Dir['Rakefile', '{bin,lib,test,spec}/**/*', 'README*', 'LICENSE*'] & `git ls-files`.split("\n")
+ s.files = Dir['Rakefile', '{bin,lib,test,spec}/**/*', 'README*', 'LICENSE*']
+ s.files &= `git ls-files -z`.split("\0") if `type -t git 2>/dev/null || which git 2>/dev/null` && $?.success?
@mhaley
mhaley added a note

Git isn't required anymore but the type or which commands are. The type command is different on Zsh and on Windows. The which command doesn't exist on Windows.

@mhaley
mhaley added a note

Or the type command

@mislav Owner
mislav added a note

I know they're not available. But do the errors appear? Or it silently fails? Because the latter is what I'm counting on.

@mhaley
mhaley added a note

It shows an error on Windows, I've proposed a solution that fails silently in issue #60.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
end

0 comments on commit fccbb0b

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