mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
refactor
This commit is contained in:
parent
dfd8f832aa
commit
49901f9ff6
2 changed files with 6 additions and 6 deletions
|
@ -2950,15 +2950,15 @@ function shouldCreateKeyFile(keyFilePath, ifKeyExists) {
|
||||||
* @returns Yes/No
|
* @returns Yes/No
|
||||||
*/
|
*/
|
||||||
function shouldRemoveSshDirectory() {
|
function shouldRemoveSshDirectory() {
|
||||||
const keepsSshDir = core.getInput("keep_ssh_dir", {
|
const keepSshDir = core.getInput("keep_ssh_dir", {
|
||||||
required: false,
|
required: false,
|
||||||
});
|
});
|
||||||
// empty string or falsy value in YAML
|
switch (keepSshDir.toLowerCase()) {
|
||||||
switch (keepsSshDir.toLowerCase()) {
|
|
||||||
case "":
|
case "":
|
||||||
case "false":
|
case "false":
|
||||||
case "no":
|
case "no":
|
||||||
case "off":
|
case "off":
|
||||||
|
// remove directory if false; empty string or falsy value in YAML
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -245,16 +245,16 @@ function shouldCreateKeyFile(keyFilePath: string, ifKeyExists: string): boolean
|
||||||
* @returns Yes/No
|
* @returns Yes/No
|
||||||
*/
|
*/
|
||||||
function shouldRemoveSshDirectory(): boolean {
|
function shouldRemoveSshDirectory(): boolean {
|
||||||
const keepsSshDir = core.getInput("keep_ssh_dir", {
|
const keepSshDir = core.getInput("keep_ssh_dir", {
|
||||||
required: false,
|
required: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
// empty string or falsy value in YAML
|
switch (keepSshDir.toLowerCase()) {
|
||||||
switch (keepsSshDir.toLowerCase()) {
|
|
||||||
case "":
|
case "":
|
||||||
case "false":
|
case "false":
|
||||||
case "no":
|
case "no":
|
||||||
case "off":
|
case "off":
|
||||||
|
// remove directory if false; empty string or falsy value in YAML
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue