Skip to content

Commit

Permalink
fix: add a new line when writing to knownhosts
Browse files Browse the repository at this point in the history
This fixes issue #476 by ensuring that when waveterm writes to a
knownhosts file, a newline character is appended at the end.
  • Loading branch information
oneirocosm committed Apr 18, 2024
1 parent 2913bab commit 67780a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wavesrv/pkg/remote/sshclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 67780a8

Please sign in to comment.