File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env php
22<?php
33
4- require __DIR__ . "/../vendor/autoload.php " ;
4+ $ baseDir = __DIR__ . '/.. ' ;
5+ if (!file_exists ($ baseDir . '/vendor ' )) {
6+ $ baseDir = __DIR__ . '/../../../.. ' ;
7+ }
58
9+ if (!file_exists ($ baseDir . '/vendor/autoload.php ' )) {
10+ die (
11+ 'File not found: ' . $ baseDir . '/vendor/autoload.php ' . PHP_EOL .
12+ 'You must set up the project dependencies, run the following commands: ' . PHP_EOL .
13+ 'curl -s http://getcomposer.org/installer | php ' . PHP_EOL .
14+ 'php composer.phar install ' . PHP_EOL
15+ );
16+ }
17+ $ loader = require $ baseDir . '/vendor/autoload.php ' ;
618$ cli = new crodas \cli \Cli ;
7- $ cli ->addDirectory (__DIR__ . "/.. /src/Command " );
19+ $ cli ->addDirectory ($ baseDir . "/src/Command " );
820$ cli ->main ();
You can’t perform that action at this time.
0 commit comments