From c113328524445f980dd3351db89a11769492fded Mon Sep 17 00:00:00 2001 From: Levi Yan Date: Thu, 17 Oct 2024 12:17:34 +0800 Subject: [PATCH] fix: if both public and private key exists, stop creating new ssh key --- src/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index 74ea736..27fa77b 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -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; }