Skip to content

Commit

Permalink
Merge pull request #441 from somewhatabstract/patch-1
Browse files Browse the repository at this point in the history
Don't rerun pageant if there are no keys to add
  • Loading branch information
dahlbyk authored Feb 24, 2017
2 parents ea5019b + 3f38ba5 commit 11c0b63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/GitUtils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,9 @@ function Add-SshKey() {
if ($args.Count -eq 0) {
$keyPath = Join-Path $Env:HOME .ssh
$keys = Get-ChildItem $keyPath/*.ppk -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName
& $pageant $keys
if ($keys) {
& $pageant $keys
}
}
else {
foreach ($value in $args) {
Expand Down

0 comments on commit 11c0b63

Please # to comment.