We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents aa68bd8 + 8ece65d commit 4a8b7d2Copy full SHA for 4a8b7d2
1 file changed
lib/java_buildpack/buildpack_version.rb
@@ -95,7 +95,7 @@ def to_s(human_readable = true)
95
96
private
97
98
- GIT_DIR = (Pathname.new(__FILE__).dirname + '../../.git').freeze
+ GIT_DIR = (Pathname.new(__FILE__).dirname.join('..', '..', '.git')).freeze
99
100
private_constant :GIT_DIR
101
@@ -104,7 +104,11 @@ def git(command)
104
end
105
106
def git?
107
- system 'which git > /dev/null'
+ if Gem.win_platform?
108
+ system 'where.exe /q git.exe'
109
+ else
110
+ system 'which git > /dev/null'
111
+ end
112
113
114
def git_dir?
0 commit comments