Skip to content

Commit dd56c93

Browse files
committed
Do not synchronize package.json if symfony/flex is not installed
1 parent c146113 commit dd56c93

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Flex.php

+6
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)