Skip to content

Commit

Permalink
fix: do not recreate key if public key don't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 authored and aymanbagabas committed Jun 27, 2023
1 parent ae51826 commit 85d0702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion keygen.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ func (s *SSHKeyPair) WriteKeys() error {

// KeyPairExists checks if the SSH key pair exists on disk.
func (s *SSHKeyPair) KeyPairExists() bool {
return fileExists(s.privateKeyPath()) && fileExists(s.publicKeyPath())
return fileExists(s.privateKeyPath())
}

func writeKeyToFile(keyBytes []byte, path string) error {
Expand Down

0 comments on commit 85d0702

Please sign in to comment.