Skip to content

Commit 0f832fd

Browse files
busterbBrent Cook
authored andcommitted
skip generating gem file contents if this is not a git checkout
1 parent ab6b5f3 commit 0f832fd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

metasploit-framework.gemspec

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ Gem::Specification.new do |spec|
2424
spec.homepage = 'https://www.metasploit.com'
2525
spec.license = 'BSD-3-clause'
2626

27-
spec.files = `git ls-files`.split($/).reject { |file|
28-
file =~ /^documentation|^data\/gui|^external/
29-
}
27+
if File.directory?(File.join(__FILE__, ".git"))
28+
spec.files = `git ls-files`.split($/).reject { |file|
29+
file =~ /^documentation|^data\/gui|^external/
30+
}
31+
end
3032
spec.bindir = '.'
3133
if ENV['CREATE_BINSTUBS']
3234
spec.executables = [

0 commit comments

Comments
 (0)