Skip to content

Commit 4a8b7d2

Browse files
committed
Merge branch 'jghiloni-master'
2 parents aa68bd8 + 8ece65d commit 4a8b7d2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

lib/java_buildpack/buildpack_version.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def to_s(human_readable = true)
9595

9696
private
9797

98-
GIT_DIR = (Pathname.new(__FILE__).dirname + '../../.git').freeze
98+
GIT_DIR = (Pathname.new(__FILE__).dirname.join('..', '..', '.git')).freeze
9999

100100
private_constant :GIT_DIR
101101

@@ -104,7 +104,11 @@ def git(command)
104104
end
105105

106106
def git?
107-
system 'which git > /dev/null'
107+
if Gem.win_platform?
108+
system 'where.exe /q git.exe'
109+
else
110+
system 'which git > /dev/null'
111+
end
108112
end
109113

110114
def git_dir?

0 commit comments

Comments
 (0)