Skip to content

Commit 7a46107

Browse files
author
Alexandre Salomé
committed
Merge pull request #65 from Rarst/windows-path
Added PATH to default environment in Windows
2 parents 9273611 + ad0bef3 commit 7a46107

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Gitonomy/Git/Repository.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,12 @@ class Repository
115115
*/
116116
public function __construct($dir, $options = array())
117117
{
118+
$is_windows = defined( 'PHP_WINDOWS_VERSION_BUILD' );
118119
$options = array_merge(array(
119120
'working_dir' => null,
120121
'debug' => true,
121122
'logger' => null,
122-
'environment_variables' => array(),
123+
'environment_variables' => $is_windows ? array( 'PATH' => $_SERVER['PATH'] ) : array(),
123124
'command' => 'git',
124125
'process_timeout' => 3600
125126
), $options);

0 commit comments

Comments
 (0)