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:
parent
75f4435545
commit
3d44217baf
2 changed files with 21 additions and 16 deletions
19
src/main.ts
19
src/main.ts
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue