Skip to content

Commit

Permalink
Merge pull request #103 from marventhieme/patch-1
Browse files Browse the repository at this point in the history
Update configure.php
  • Loading branch information
riasvdv authored Dec 2, 2024
2 parents 4ebca2c + a846e6f commit ae0b208
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configure.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function writeln(string $line): void

function run(string $command): string
{
return trim(shell_exec($command));
return trim(shell_exec($command) ?? '');
}

function str_after(string $subject, string $search): string
Expand Down Expand Up @@ -209,7 +209,7 @@ function setupCodeStyleLibrary(string $codeStyleLibrary): void
$gitEmail = run('git config user.email');
$authorEmail = ask('Author email', $gitEmail);

$usernameGuess = explode(':', run('git config remote.origin.url'))[1];
$usernameGuess = explode(':', run('git config remote.origin.url'))[1] ?? '';
$usernameGuess = dirname($usernameGuess);
$usernameGuess = basename($usernameGuess);
$authorUsername = ask('Author username', $usernameGuess);
Expand Down

0 comments on commit ae0b208

Please sign in to comment.