From 169979fb68d45d0ccad5a5bca08ba226e7c4c9fd Mon Sep 17 00:00:00 2001 From: YoussefACHCHIRAJ Date: Wed, 5 Nov 2025 21:28:32 +0100 Subject: [PATCH] handle external dependencies --- src/Traits/CanHandleDependenciesInstallation.php | 7 ++++--- tests/Feature/Commands/RemoveCommandTest.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Traits/CanHandleDependenciesInstallation.php b/src/Traits/CanHandleDependenciesInstallation.php index a518e22..3f816ae 100644 --- a/src/Traits/CanHandleDependenciesInstallation.php +++ b/src/Traits/CanHandleDependenciesInstallation.php @@ -155,9 +155,10 @@ public function installExternalDeps(array $deps) } $this->command->info(" ↳ Installing $name External Dependencies"); - foreach ($deps as $key => $dep) { - $this->command->info(" Installing $key..."); - Process::run($dep[1]); + foreach ($deps as $dep) { + $name = key($dep); + $this->command->info(" Installing $name..."); + Process::run($dep[$name]); } } diff --git a/tests/Feature/Commands/RemoveCommandTest.php b/tests/Feature/Commands/RemoveCommandTest.php index 55bd934..e198664 100644 --- a/tests/Feature/Commands/RemoveCommandTest.php +++ b/tests/Feature/Commands/RemoveCommandTest.php @@ -47,7 +47,7 @@ }); -it("Removes an installed component along with its dependencies when removal is confirmed.", function () { +it("Removes an installed component along with its dependencies when removal is confirmed. update test descriptions for component removal scenarios", function () { $component = 'autocomplete'; $dependency = 'icon';