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: