From 530688a36c8cfc96d25957fdc38caf0b82d45b21 Mon Sep 17 00:00:00 2001 From: Bryan Nielsen Date: Mon, 23 Sep 2024 16:38:17 -0400 Subject: [PATCH] Fix post install link for DDEV users, closes #18 --- CHANGELOG.md | 1 + src/Commands/CoilpackCommand.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3c287a..00e2253 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixed - Support for arguments on custom Date fields +- Displaying Coilpack's Github link after installation with DDEV ## [1.4.0] - 2024-08-12 diff --git a/src/Commands/CoilpackCommand.php b/src/Commands/CoilpackCommand.php index 3dcbf54..9963746 100644 --- a/src/Commands/CoilpackCommand.php +++ b/src/Commands/CoilpackCommand.php @@ -285,6 +285,10 @@ protected function askForStar() $command = array_key_exists(PHP_OS_FAMILY, $openUrlCommands) ? $openUrlCommands[PHP_OS_FAMILY] : null; + if (! empty($_ENV['DDEV_PROJECT_TYPE'] ?? '')) { + return $this->comment("It looks like you're using DDEV. We can't open the url directly but you can still star the repo by running `ddev launch $url`"); + } + if (! $command) { $this->comment("Oops, this is embarrassing. \n We can't open the url on your operating system but you can still star the repo: $url"); }