From f02ea6dcb932ffab81b0f133e09e0d27ae1f872a Mon Sep 17 00:00:00 2001 From: xmz Date: Fri, 19 Apr 2024 15:14:28 +0800 Subject: [PATCH] fix config.js --- src/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.js b/src/config.js index cb2ddac..f256135 100644 --- a/src/config.js +++ b/src/config.js @@ -5,7 +5,7 @@ const inputConfigKey = 'CONFIG_PATH'; const inputSshKeyPath = 'SSH_PRIVATE_KEY_PATH'; const readConfig = (configPath) => { - if (existsSync(configPath)) { + if (!existsSync(configPath)) { const message = `⚠️ [FILE] ${configPath} Required file exist.`; throw new Error(message); } @@ -20,7 +20,7 @@ const readConfig = (configPath) => { }; const readSshKey = (SshKeyPath) => { - if (existsSync(SshKeyPath)) { + if (!existsSync(SshKeyPath)) { const message = `⚠️ [FILE] ${SshKeyPath} Required file exist.`; throw new Error(message); }