Fixed issue 119, no environment for the shell_exec and exec calls.
For each call exec or shell_exec, I have added the ability to prepend a string. For example '/usr/bin/env -i '.
This commit is contained in:
@@ -235,7 +235,8 @@ class IDF_Scm_Git
|
||||
*/
|
||||
public function getBlob($request_file_info, $dummy=null)
|
||||
{
|
||||
return shell_exec(sprintf('GIT_DIR=%s git cat-file blob %s',
|
||||
return shell_exec(sprintf(Pluf::f('idf_exec_cmd_prefix', '').
|
||||
'GIT_DIR=%s git cat-file blob %s',
|
||||
escapeshellarg($this->repo),
|
||||
escapeshellarg($request_file_info->hash)));
|
||||
}
|
||||
@@ -410,7 +411,8 @@ class IDF_Scm_Git
|
||||
*/
|
||||
public function getArchiveCommand($commit, $prefix='git-repo-dump/')
|
||||
{
|
||||
return sprintf('GIT_DIR=%s git archive --format=zip --prefix=%s %s',
|
||||
return sprintf(Pluf::f('idf_exec_cmd_prefix', '').
|
||||
'GIT_DIR=%s git archive --format=zip --prefix=%s %s',
|
||||
escapeshellarg($this->repo),
|
||||
escapeshellarg($prefix),
|
||||
escapeshellarg($commit));
|
||||
|
@@ -398,7 +398,8 @@ class IDF_Scm_Mercurial
|
||||
*/
|
||||
public function getArchiveCommand($commit, $prefix='')
|
||||
{
|
||||
return sprintf('hg archive --type=zip -R %s -r %s -',
|
||||
return sprintf(Pluf::f('idf_exec_cmd_prefix', '').
|
||||
'hg archive --type=zip -R %s -r %s -',
|
||||
escapeshellarg($this->repo),
|
||||
escapeshellarg($commit));
|
||||
}
|
||||
|
@@ -369,7 +369,7 @@ class IDF_Scm_Svn
|
||||
*/
|
||||
public function getArchiveCommand($commit, $prefix='git-repo-dump/')
|
||||
{
|
||||
throw new Exception(('Unsupported feature.'));
|
||||
throw new Exception('Unsupported feature.');
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user