summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/bundler/support/path.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/bundler/support/path.rb b/spec/bundler/support/path.rb
index cc5aebb01b..e778809830 100644
--- a/spec/bundler/support/path.rb
+++ b/spec/bundler/support/path.rb
@@ -30,14 +30,23 @@ module Spec
end
def tracked_files
+ if root != `git rev-parse --show-toplevel`
+ skip 'not in git working directory'
+ end
@tracked_files ||= ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler man/bundler*` : `git ls-files -z`
end
def shipped_files
+ if root != `git rev-parse --show-toplevel`
+ skip 'not in git working directory'
+ end
@shipped_files ||= ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb man/bundler* libexec/bundle*` : `git ls-files -z -- lib man exe CHANGELOG.md LICENSE.md README.md bundler.gemspec`
end
def lib_tracked_files
+ if root != `git rev-parse --show-toplevel`
+ skip 'not in git working directory'
+ end
@lib_tracked_files ||= ruby_core? ? `git ls-files -z -- lib/bundler lib/bundler.rb` : `git ls-files -z -- lib`
end