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 Sep 11, 2023
1 parent 3980bd5 commit f48f6d5
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 @@ -66,7 +66,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
throw new \InvalidArgumentException('Cannot use both the project argument and the --clone option');
}
if (!empty($project)) {
$cloneUrl = sprintf('https://%s@github.com/%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 f48f6d5

Please sign in to comment.