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:
Sylvie Crowe
2024-04-18 14:51:11 -07:00
committed by GitHub
parent 2913babea7
commit 39ee41921f
+1 -1
View File
@@ -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