From 49901f9ff6e4a5c161c8ec15b8ef29f5e42e29d1 Mon Sep 17 00:00:00 2001 From: shimataro Date: Mon, 9 Oct 2023 18:54:23 +0900 Subject: [PATCH] refactor --- lib/index.js | 6 +++--- src/main.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/index.js b/lib/index.js index 196de56..bbe884a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -2950,15 +2950,15 @@ function shouldCreateKeyFile(keyFilePath, ifKeyExists) { * @returns Yes/No */ function shouldRemoveSshDirectory() { - const keepsSshDir = core.getInput("keep_ssh_dir", { + const keepSshDir = core.getInput("keep_ssh_dir", { required: false, }); - // empty string or falsy value in YAML - switch (keepsSshDir.toLowerCase()) { + switch (keepSshDir.toLowerCase()) { case "": case "false": case "no": case "off": + // remove directory if false; empty string or falsy value in YAML return true; default: return false; diff --git a/src/main.ts b/src/main.ts index ab590e9..cdf5d7f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -245,16 +245,16 @@ function shouldCreateKeyFile(keyFilePath: string, ifKeyExists: string): boolean * @returns Yes/No */ function shouldRemoveSshDirectory(): boolean { - const keepsSshDir = core.getInput("keep_ssh_dir", { + const keepSshDir = core.getInput("keep_ssh_dir", { required: false, }); - // empty string or falsy value in YAML - switch (keepsSshDir.toLowerCase()) { + switch (keepSshDir.toLowerCase()) { case "": case "false": case "no": case "off": + // remove directory if false; empty string or falsy value in YAML return true; default: