Skip to content

Commit 9a6382c

Browse files
author
Yevhen Miroshnychenko
authored
Merge pull request #3126 from magento-thunder/MAGETWO-94474
Fixed issues: - MAGETWO-94474: Command bin/magento doesn't work if magento uninstalled
2 parents e13b87f + 0766511 commit 9a6382c

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;
@@ -74,7 +73,6 @@ public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN')
7473

7574
$this->assertCompilerPreparation();
7675
$this->initObjectManager();
77-
$this->assertGenerationPermissions();
7876
} catch (\Exception $exception) {
7977
$output = new \Symfony\Component\Console\Output\ConsoleOutput();
8078
$output->writeln(
@@ -173,33 +171,6 @@ private function initObjectManager()
173171
$omProvider->setObjectManager($this->objectManager);
174172
}
175173

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

0 commit comments

Comments
 (0)