mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Set php PATH for repository's hook
Summary: ~~Set PATH for repository's hook, so the environment.append-paths can used~~ repository's hook may can't find php path if user's profile like bash_profile is not loaded. Test Plan: check the hook generated is contain the right path Reviewers: epriestley, #blessed_reviewers CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7743
This commit is contained in:
parent
5ce0edaf69
commit
f981d50f5d
1 changed files with 7 additions and 1 deletions
8
src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
Normal file → Executable file
8
src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
Normal file → Executable file
|
@ -159,7 +159,13 @@ final class PhabricatorRepositoryPullEngine
|
|||
|
||||
$root = dirname(phutil_get_library_root('phabricator'));
|
||||
$bin = $root.'/bin/commit-hook';
|
||||
$cmd = csprintf('exec %s %s "$@"', $bin, $callsign);
|
||||
|
||||
$full_php_path = Filesystem::resolveBinary('php');
|
||||
$cmd = csprintf(
|
||||
'exec %s -f %s -- %s "$@"',
|
||||
$full_php_path,
|
||||
$bin,
|
||||
$callsign);
|
||||
|
||||
$hook = "#!/bin/sh\n{$cmd}\n";
|
||||
|
||||
|
|
Loading…
Reference in a new issue