From 0f832fd4d1d3f3cdbdcc6bedae99af42ce5cb873 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Fri, 26 May 2017 10:07:49 -0500 Subject: [PATCH] skip generating gem file contents if this is not a git checkout --- metasploit-framework.gemspec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 = [