Skip to content

Commit

Permalink
remove only linux support
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandr-yulin committed Jan 10, 2021
1 parent 70bf275 commit f231a81
Show file tree
Hide file tree
Showing 5 changed files with 1,113 additions and 576 deletions.
12 changes: 6 additions & 6 deletions bin/console-runner
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

declare(strict_types=1);

if (PHP_SAPI !== 'cli' || PHP_OS !== 'Linux') {
if (PHP_SAPI !== 'cli') {
return false;
}
$autoloadFiles = [
Expand All @@ -21,28 +21,28 @@ $autoloadFiles = [
];

foreach ($autoloadFiles as $autoloadFile) {
if (file_exists($autoloadFile)) {
if (\file_exists($autoloadFile)) {
require $autoloadFile;
break;
}
}
(function() {
$directories = [
getcwd() . '/',
realpath(__DIR__) . '/../../../../config/'
\getcwd() . '/',
\realpath(__DIR__) . '/../../../../config/'
];

/** @var \Psr\Container\ContainerInterface|null $container */
$container = null;
foreach ($directories as $directory) {
$config = $directory . 'cli-container.php';
if (file_exists($config)) {
if (\file_exists($config)) {
$container = require $config;
break;
}
}

if (($container instanceof \Psr\Container\ContainerInterface) === false) {
if (!$container instanceof \Psr\Container\ContainerInterface) {
echo <<<'HELP'
You are missing a "cli-container.php" or "config/cli-container.php" file in your
project, which is required to get the Console Runner working. You can use the
Expand Down
Loading

0 comments on commit f231a81

Please sign in to comment.