Skip to content

Commit

Permalink
Merge pull request #108 from daften/feature/git-dir
Browse files Browse the repository at this point in the history
Use --git-dir instead of GIT_DIR env variable
  • Loading branch information
cweagans authored Mar 19, 2017
2 parents 306a4d4 + d95d95b commit b3036f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Patches.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,10 @@ protected function getAndApplyPatch(RemoteFilesystem $downloader, $install_path,
// it might be useful.
$patch_levels = array('-p1', '-p0', '-p2');
foreach ($patch_levels as $patch_level) {
$checked = $this->executeCommand('cd %s && git apply --check %s %s', $install_path, $patch_level, $filename);
$checked = $this->executeCommand('cd %s && git --git-dir=. apply --check %s %s', $install_path, $patch_level, $filename);
if ($checked) {
// Apply the first successful style.
$patched = $this->executeCommand('cd %s && git apply %s %s', $install_path, $patch_level, $filename);
$patched = $this->executeCommand('cd %s && git --git-dir=. apply %s %s', $install_path, $patch_level, $filename);
break;
}
}
Expand Down

0 comments on commit b3036f2

Please sign in to comment.