mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-20 05:42:40 +01:00
Add explicit "/" when installing hooks
Summary: There's no guarantee that the local path has a trailing "/". We should probably guarantee that at some point, but just add one unconditionally for now. Auditors: btrahan
This commit is contained in:
parent
ba16df0fed
commit
50b5a0c8b7
1 changed files with 4 additions and 4 deletions
|
@ -311,9 +311,9 @@ final class PhabricatorRepositoryPullEngine
|
|||
$path = $repository->getLocalPath();
|
||||
|
||||
if ($repository->isWorkingCopyBare()) {
|
||||
$path .= 'hooks/pre-receive';
|
||||
$path .= '/hooks/pre-receive';
|
||||
} else {
|
||||
$path .= '.git/hooks/pre-receive';
|
||||
$path .= '/.git/hooks/pre-receive';
|
||||
}
|
||||
|
||||
$this->installHook($path);
|
||||
|
@ -390,7 +390,7 @@ final class PhabricatorRepositoryPullEngine
|
|||
*/
|
||||
private function installMercurialHook() {
|
||||
$repository = $this->getRepository();
|
||||
$path = $repository->getLocalPath().'.hg/hgrc';
|
||||
$path = $repository->getLocalPath().'/.hg/hgrc';
|
||||
|
||||
$root = dirname(phutil_get_library_root('phabricator'));
|
||||
$bin = $root.'/bin/commit-hook';
|
||||
|
@ -430,7 +430,7 @@ final class PhabricatorRepositoryPullEngine
|
|||
*/
|
||||
private function installSubversionHook() {
|
||||
$repository = $this->getRepository();
|
||||
$path = $repository->getLocalPath().'hooks/pre-commit';
|
||||
$path = $repository->getLocalPath().'/hooks/pre-commit';
|
||||
|
||||
$this->installHook($path);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue