Skip to content

Commit c5941c6

Browse files
committed
Merge branch '1.x' into 2.x
* 1.x: Do not synchronize package.json if symfony/flex is not installed
2 parents c146113 + 0491870 commit c5941c6

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
@@ -502,6 +502,12 @@ public function finish(string $rootDir, ?string $originalComposerJsonHash = null
502502

503503
private function synchronizePackageJson(string $rootDir)
504504
{
505+
if (!$this->downloader->isEnabled()) {
506+
$this->io->writeError('<warning>Synchronizing package.json is disabled: "symfony/flex" not found in the root composer.json</>');
507+
508+
return;
509+
}
510+
505511
$rootDir = realpath($rootDir);
506512
$vendorDir = trim((new Filesystem())->makePathRelative($this->config->get('vendor-dir'), $rootDir), '/');
507513

0 commit comments

Comments
 (0)