Skip to content

Commit

Permalink
Merge pull request #255 from theaquamarine/keysfix
Browse files Browse the repository at this point in the history
Fix multiple Pageant keys handling
  • Loading branch information
dahlbyk committed May 4, 2016
2 parents 9383f9f + f504692 commit 6bd5770
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions GitUtils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,8 @@ function Add-SshKey() {
if ($args.Count -eq 0) {
$keystring = ""
$keyPath = Join-Path $Env:HOME ".ssh"
$keys = Get-ChildItem $keyPath/"*.ppk" | Select -ExpandProperty Name
foreach ( $key in $keys ) { $keystring += "`"$keyPath\$key`" " }
if ( $keystring ) { & $pageant "$keystring" }
$keys = Get-ChildItem $keyPath/"*.ppk" -ErrorAction SilentlyContinue | Select -ExpandProperty FullName
& $pageant $keys
} else {
foreach ($value in $args) {
& $pageant $value
Expand Down

0 comments on commit 6bd5770

Please sign in to comment.