From 6572b25b7f6a7b90cd687a2d54e65bbfd175eb7a Mon Sep 17 00:00:00 2001 From: Adam Weston Date: Sun, 8 Jan 2023 12:43:49 -0500 Subject: [PATCH] fix username guess --- configure.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.php b/configure.php index b9b4dfd..b76cb0c 100644 --- a/configure.php +++ b/configure.php @@ -7,8 +7,8 @@ $authorName = ask('Author name', $gitName); $gitEmail = run('git config user.email'); $authorEmail = ask('Author email', $gitEmail); -$usernameGuess = explode(':', run('git config remote.origin.url'))[1]; -if ($usernameGuess) { +$usernameGuess = explode(':', run('git config remote.origin.url'))[1] ?? ''; +if ($usernameGuess !== '') { $usernameGuess = dirname($usernameGuess); $usernameGuess = basename($usernameGuess); }