fix: if both public and private key exists, stop creating new ssh key

This commit is contained in:
Levi Yan
2024-10-17 12:17:34 +08:00
parent 34927df20f
commit c113328524

View File

@@ -90,8 +90,8 @@ export function getDefaultPrivateKey(): string {
}
export function createSSHKey() {
if (!existDefaultPublicKey() || existDefaultPrivateKey()) {
// if public or private key exists, stop
if (existDefaultPublicKey() && existDefaultPrivateKey()) {
// if both public and private key exists, stop
return;
}