fix reversion

In 793ddecd4b, writeSshConfig was made to
writeFile a ByteString, which lost the newline conversion on Windows.

Added linesFile to fix it. This will also be useful for other writeFile
conversions.
This commit is contained in:
Joey Hess 2025-01-22 15:32:21 -04:00
parent 7a94ba1bf2
commit de1af273e0
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 20 additions and 2 deletions

View file

@ -145,7 +145,7 @@ changeUserSshConfig modifier = do
writeSshConfig :: OsPath -> String -> IO ()
writeSshConfig f s = do
F.writeFile' f (encodeBS s)
F.writeFile' f (linesFile' (encodeBS s))
setSshConfigMode (fromOsPath f)
{- Ensure that the ssh config file lacks any group or other write bits,