Skip to content

Commit 3b30f63

Browse files
author
Yevhen Miroshnychenko
committed
MAGETWO-94474: Command bin/magento doesn't work if magento uninstalled
1 parent 5c70bb7 commit 3b30f63

File tree

1 file changed

+0
-29
lines changed
  • lib/internal/Magento/Framework/Console

1 file changed

+0
-29
lines changed

lib/internal/Magento/Framework/Console/Cli.php

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Magento\Framework\App\DeploymentConfig;
1010
use Magento\Framework\App\Filesystem\DirectoryList;
1111
use Magento\Framework\App\ProductMetadata;
12-
use Magento\Framework\App\State;
1312
use Magento\Framework\Composer\ComposerJsonFinder;
1413
use Magento\Framework\Console\Exception\GenerationDirectoryAccessException;
1514
use Magento\Framework\Filesystem\Driver\File;
@@ -73,7 +72,6 @@ public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN')
7372

7473
$this->assertCompilerPreparation();
7574
$this->initObjectManager();
76-
$this->assertGenerationPermissions();
7775
} catch (\Exception $exception) {
7876
$output = new \Symfony\Component\Console\Output\ConsoleOutput();
7977
$output->writeln(
@@ -171,33 +169,6 @@ private function initObjectManager()
171169
$omProvider->setObjectManager($this->objectManager);
172170
}
173171

174-
/**
175-
* Checks whether generation directory is read-only.
176-
* Depends on the current mode:
177-
* production - application will proceed
178-
* default - application will be terminated
179-
* developer - application will be terminated
180-
*
181-
* @return void
182-
* @throws GenerationDirectoryAccessException If generation directory is read-only in developer mode
183-
*/
184-
private function assertGenerationPermissions()
185-
{
186-
/** @var GenerationDirectoryAccess $generationDirectoryAccess */
187-
$generationDirectoryAccess = $this->objectManager->create(
188-
GenerationDirectoryAccess::class,
189-
['serviceManager' => $this->serviceManager]
190-
);
191-
/** @var State $state */
192-
$state = $this->objectManager->get(State::class);
193-
194-
if ($state->getMode() !== State::MODE_PRODUCTION
195-
&& !$generationDirectoryAccess->check()
196-
) {
197-
throw new GenerationDirectoryAccessException();
198-
}
199-
}
200-
201172
/**
202173
* Checks whether compiler is being prepared.
203174
*

0 commit comments

Comments
 (0)