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
|
||||
*/
|
||||
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;
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue