1
0
Fork 0
mirror of https://github.com/shimataro/ssh-key-action.git synced 2025-06-19 22:52:10 +10:00

ignore known_hosts if no_known_hosts is true

This commit is contained in:
shimataro 2021-03-08 17:53:38 +09:00
parent 75f4435545
commit 3d44217baf
No known key found for this signature in database
GPG key ID: BE92C05736911A9D
2 changed files with 21 additions and 16 deletions

View file

@ -39,14 +39,6 @@ function main(): void
// files to be created
const files: FileInfo[] = [
{
name: "known_hosts",
contents: insertLf(knownHosts, true, true),
options: {
mode: 0o644,
flag: "a",
},
},
{
name: "config",
contents: insertLf(config, true, true),
@ -67,6 +59,17 @@ function main(): void
},
});
}
if(!noKnownHosts)
{
files.push({
name: "known_hosts",
contents: insertLf(knownHosts, true, true),
options: {
mode: 0o644,
flag: "a",
},
});
}
// create files
for(const file of files)