diff --git a/metasploit-framework.gemspec b/metasploit-framework.gemspec index e4e7239495..6595d9497d 100644 --- a/metasploit-framework.gemspec +++ b/metasploit-framework.gemspec @@ -24,9 +24,11 @@ Gem::Specification.new do |spec| spec.homepage = 'https://www.metasploit.com' spec.license = 'BSD-3-clause' - spec.files = `git ls-files`.split($/).reject { |file| - file =~ /^documentation|^data\/gui|^external/ - } + if File.directory?(File.join(__FILE__, ".git")) + spec.files = `git ls-files`.split($/).reject { |file| + file =~ /^documentation|^data\/gui|^external/ + } + end spec.bindir = '.' if ENV['CREATE_BINSTUBS'] spec.executables = [