mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user