Skip to content

Commit

Permalink
Merge pull request #16 from zeeshanu/fix-signingkey
Browse files Browse the repository at this point in the history
Do not write empty signingkey
  • Loading branch information
j0k3r authored Mar 14, 2017
2 parents 1024e39 + 3b1999b commit 87a0ea0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Commands/UseGitProfileCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public function execute(InputInterface $input, OutputInterface $output)
if ($input->getOption('global')) {
$this->runCommand(sprintf('git config --global user.name "%s"', $name), $mustRun);
$this->runCommand(sprintf('git config --global user.email "%s"', $email), $mustRun);
$this->runCommand(sprintf('git config --global user.signingkey "%s"', $signingkey), $mustRun);
if ($signingkey) {
$this->runCommand(sprintf('git config --global user.signingkey "%s"', $signingkey), $mustRun);
}

$this->switchProfile($profileTitle, 'global');

Expand All @@ -61,7 +63,9 @@ public function execute(InputInterface $input, OutputInterface $output)

$this->runCommand(sprintf('git config user.name "%s"', $name), $mustRun);
$this->runCommand(sprintf('git config user.email "%s"', $email), $mustRun);
$this->runCommand(sprintf('git config user.signingkey "%s"', $signingkey), $mustRun);
if ($signingkey) {
$this->runCommand(sprintf('git config user.signingkey "%s"', $signingkey), $mustRun);
}

$this->switchProfile($profileTitle);

Expand Down

0 comments on commit 87a0ea0

Please sign in to comment.