mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
fix: add a new line when writing to knownhosts (#582)
This fixes issue #476 by ensuring that when waveterm writes to a knownhosts file, a newline character is appended at the end.
This commit is contained in:
parent
2913babea7
commit
39ee41921f
@ -292,7 +292,7 @@ func writeToKnownHosts(knownHostsFile string, newLine string, getUserVerificatio
|
||||
return UserInputCancelError{Err: fmt.Errorf("canceled by the user")}
|
||||
}
|
||||
|
||||
_, err = f.WriteString(newLine)
|
||||
_, err = f.WriteString(newLine + "\n")
|
||||
if err != nil {
|
||||
f.Close()
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user