Skip to content

Commit

Permalink
Ensure function when token not provided.
Browse files Browse the repository at this point in the history
  • Loading branch information
mchurchward committed Aug 18, 2021
1 parent 2ee9cb8 commit a477d82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Command/AddPluginCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
if (!empty($project)) {
/** @psalm-suppress PossiblyInvalidArgument */
$cloneUrl = sprintf('https://%[email protected]/%s.git', $token, $project);
$token = ($token !== null) ? $token . '@' : '';
$cloneUrl = sprintf('https://%sgithub.com/%s.git', $token, $project);
} elseif (!empty($clone)) {
$cloneUrl = $clone;
} else {
Expand Down

0 comments on commit a477d82

Please sign in to comment.