8000 Do not synchronize package.json if symfony/flex is not installed · symfony/flex@740bc2f · GitHub
[go: up one dir, main page]

Skip to content

Commit 740bc2f

Browse files
leofeyerfabpot
authored andcommitted
Do not synchronize package.json if symfony/flex is not installed
1 parent 1aabc8e commit 740bc2f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Flex.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,12 @@ public function finish(string $rootDir, ?string $originalComposerJsonHash = null
600600

601601
private function synchronizePackageJson(string $rootDir)
602602
{
603+
if (!$this->downloader->isEnabled()) {
604+
$this->io->writeError('<warning>Synchronizing package.json is disabled: "symfony/flex" not found in the root composer.json</>');
605+
606+
return;
607+
}
608+
603609
$rootDir = realpath($rootDir);
604610
$vendorDir = trim((new Filesystem())->makePathRelative($this->config->get('vendor-dir'), $rootDir), '/');
605611

0 commit comments

Comments
 (0)
0