From 69cae6fc84f623859d81d1d1c709ceccddce9b10 Mon Sep 17 00:00:00 2001 From: jmsche Date: Thu, 24 Aug 2023 09:13:18 +0200 Subject: [PATCH] [AssetMapper] Improve exception message when a downloaded asset is not found --- .../Component/AssetMapper/ImportMap/ImportMapManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/AssetMapper/ImportMap/ImportMapManager.php b/src/Symfony/Component/AssetMapper/ImportMap/ImportMapManager.php index 16311f90dd45..c6fde3e5718c 100644 --- a/src/Symfony/Component/AssetMapper/ImportMap/ImportMapManager.php +++ b/src/Symfony/Component/AssetMapper/ImportMap/ImportMapManager.php @@ -412,7 +412,7 @@ private function convertEntriesToImports(array $entries): array if (null !== $entryOptions->path) { if (!$asset = $this->assetMapper->getAsset($entryOptions->path)) { if ($entryOptions->isDownloaded) { - throw new \InvalidArgumentException(sprintf('The "%s" downloaded asset is missing. Run "php bin/console importmap:require "%s" --download".', $entryOptions->path, $entryOptions->importName)); + throw new \InvalidArgumentException(sprintf('The "%s" downloaded asset is missing. Run "php bin/console importmap:install".', $entryOptions->path)); } throw new \InvalidArgumentException(sprintf('The asset "%s" mentioned in "%s" cannot be found in any asset map paths.', $entryOptions->path, basename($this->importMapConfigPath)));