From 5d0e61f20d7cd73c88f1d2579d0201fed211945b Mon Sep 17 00:00:00 2001 From: Marion Hurteau Date: Wed, 13 Mar 2024 18:03:41 +0100 Subject: [PATCH] Add array_unique on urls listing When running `castor start`, on some projects, the same url is displayed multiple times, for instance : ``` Available URLs for this project: -------------------------------- * https://foodomarket.local * https://elasticsearch.foodomarket.local * https://kibana.foodomarket.local * https://redis.foodomarket.local * https://foodomarket.local * https://foodomarket.local ``` --- .castor/docker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.castor/docker.php b/.castor/docker.php index d47dcc4..7505789 100644 --- a/.castor/docker.php +++ b/.castor/docker.php @@ -51,7 +51,7 @@ function about(): void $urls = [...$urls, ...$hosts]; } } - io()->listing(array_map(fn ($url) => "https://{$url}", $urls)); + io()->listing(array_map(fn ($url) => "https://{$url}", array_unique($urls))); } #[AsTask(description: 'Opens the project in your browser', namespace: '', aliases: ['open'])]