Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Hide error if ~/.ssh doesn't exist

  • Loading branch information...
commit 827b8352bab3410584ab36f7997089b0007bbd3f 1 parent a6606ea
@dahlbyk authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 GitUtils.ps1
View
4 GitUtils.ps1
@@ -246,8 +246,8 @@ function Add-SshKey() {
if (!$sshAdd) { Write-Warning 'Could not find ssh-add'; return }
if ($args.Count -eq 0) {
- $sshPath = Resolve-Path ~/.ssh/id_rsa
- & $sshAdd $sshPath
+ $sshPath = Resolve-Path ~/.ssh/id_rsa -ErrorAction SilentlyContinue
+ if ($sshPath) { & $sshAdd $sshPath }
} else {
foreach ($value in $args) {
& $sshAdd $value
Please sign in to comment.
Something went wrong with that request. Please try again.