File tree 3 files changed +4
-6
lines changed
3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -66,11 +66,9 @@ Git env config
66
66
# If you need to use a custom SSH script
67
67
config.git_ssh = ' /path/to/ssh/script'
68
68
end
69
-
70
69
```
71
70
72
- _ NOTE: Another way to specify where is the ` git ` binary is through the environment variable ` GIT_BINARY ` _
73
-
71
+ _ NOTE: Another way to specify where is the ` git ` binary is through the environment variable ` GIT_PATH ` _
74
72
75
73
Here are the operations that need read permission only.
76
74
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ def initialize
10
10
end
11
11
12
12
def binary_path
13
- @binary_path || ENV [ 'GIT_BINARY' ] || 'git'
13
+ @binary_path || ENV [ 'GIT_PATH' ] && File . join ( ENV [ 'GIT_PATH' ] , 'git' ) || 'git'
14
14
end
15
15
16
16
def git_ssh
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def test_env_config
34
34
assert_equal ( Git ::Base . config . binary_path , 'git' )
35
35
assert_equal ( Git ::Base . config . git_ssh , nil )
36
36
37
- ENV [ 'GIT_BINARY ' ] = '/env/bin/git '
37
+ ENV [ 'GIT_PATH ' ] = '/env/bin'
38
38
ENV [ 'GIT_SSH' ] = '/env/git/ssh'
39
39
40
40
assert_equal ( Git ::Base . config . binary_path , '/env/bin/git' )
@@ -51,7 +51,7 @@ def test_env_config
51
51
@git . log
52
52
ensure
53
53
ENV [ 'GIT_SSH' ] = nil
54
- ENV [ 'GIT_BINARY ' ] = nil
54
+ ENV [ 'GIT_PATH ' ] = nil
55
55
56
56
Git . configure do |config |
57
57
config . binary_path = nil
You can’t perform that action at this time.
0 commit comments