Fix two issues with shell/config scripts for hosted repositories
Summary: Ref T4151. `-ne` is numeric in some/most/all shells; `exec --` apparently doens't always work. Test Plan: Will make @zeeg test. Reviewers: btrahan, zeeg Reviewed By: zeeg CC: zeeg, aran Maniphest Tasks: T4151 Differential Revision: https://secure.phabricator.com/D7702
This commit is contained in:
		| @@ -6,7 +6,7 @@ VCSUSER="vcs-user" | ||||
| # NOTE: Replace this with the path to your Phabricator directory. | ||||
| ROOT="/path/to/phabricator" | ||||
|  | ||||
| if [ "$1" -ne "$VCSUSER" ]; | ||||
| if [ "$1" != "$VCSUSER" ]; | ||||
| then | ||||
|   exit 1 | ||||
| fi | ||||
|   | ||||
| @@ -162,7 +162,7 @@ final class PhabricatorRepositoryPullEngine | ||||
|  | ||||
|     $root = dirname(phutil_get_library_root('phabricator')); | ||||
|     $bin = $root.'/bin/commit-hook'; | ||||
|     $cmd = csprintf('exec -- %s %s "$@"', $bin, $callsign); | ||||
|     $cmd = csprintf('exec %s %s "$@"', $bin, $callsign); | ||||
|  | ||||
|     $hook = "#!/bin/sh\n{$cmd}\n"; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 epriestley
					epriestley