From bc31351b5bbbc5d33e916c1e54df3a291c0909b5 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 15 Dec 2020 20:39:50 +0100 Subject: [PATCH] Only show getting started warning for non-global composer load --- src/Composer/Factory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index ad713714d..cd6662c30 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -295,7 +295,7 @@ class Factory } else { $message = 'Composer could not find the config file: '.$localConfig; } - $instructions = 'To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section'; + $instructions = $fullLoad ? 'To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section' : ''; throw new \InvalidArgumentException($message.PHP_EOL.$instructions); }