File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " cpx/cpx" ,
33 "description" : " Run any command from any composer package, even if it's not installed in your project." ,
4- "version" : " 1.0.0 " ,
4+ "version" : " 1.0.1 " ,
55 "type" : " library" ,
66 "license" : " MIT" ,
77 "keywords" : [
Original file line number Diff line number Diff line change @@ -18,7 +18,21 @@ use Cpx\Commands\AliasesCommand;
1818use Cpx \Commands \UpgradeCommand ;
1919use Cpx \Commands \VersionCommand ;
2020
21- require_once __DIR__ . '/vendor/autoload.php ' ;
21+ if (isset ($ GLOBALS ['_composer_autoload_path ' ])) {
22+ require_once $ GLOBALS ['_composer_autoload_path ' ];
23+
24+ unset($ GLOBALS ['_composer_autoload_path ' ]);
25+ } else {
26+ foreach ([__DIR__ . '/../../autoload.php ' , __DIR__ . '/../vendor/autoload.php ' , __DIR__ . '/vendor/autoload.php ' ] as $ file ) {
27+ if (file_exists ($ file )) {
28+ require_once $ file ;
29+
30+ break ;
31+ }
32+ }
33+
34+ unset($ file );
35+ }
2236
2337function printColor (string $ message , string $ color = "\033[1;32m " ): void
2438{
You can’t perform that action at this time.
0 commit comments