Skip to content

Commit a52b194

Browse files
committed
load composer autoload in api command if it is available
1 parent cd52e88 commit a52b194

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build/commands/ApiCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,13 @@ public function getHelp()
5757

5858
/**
5959
* Execute the action.
60-
* @param array command line parameters specific for this command
60+
* @param array $args command line parameters specific for this command
6161
*/
6262
public function run($args)
6363
{
64+
if(is_file($composerAutoload=__DIR__.'/../../vendor/autoload.php'))
65+
require $composerAutoload;
66+
6467
$options=array(
6568
'fileTypes'=>array('php'),
6669
'exclude'=>array(

0 commit comments

Comments
 (0)