Skip to content

Commit 7e6e6a4

Browse files
authored
Merge pull request #3983 from ncaq/fix-no-newline-terminating-file
fixed: terminating is newline
2 parents 3652533 + 4256be7 commit 7e6e6a4

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Other enhancements:
1313

1414
Bug fixes:
1515

16+
* `~/.stack/config.yaml` and `stack.yaml` terminating by newline
1617

1718
## v1.7.0.3 (release candidate)
1819

src/Stack/Config.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,4 +964,5 @@ defaultConfigYaml = S.intercalate "\n"
964964
, "# author-email:"
965965
, "# copyright:"
966966
, "# github-username:"
967+
, ""
967968
]

src/Stack/Init.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ renderStackYaml p ignoredPackages dupPackages =
185185
<> F.foldMap (goComment o) comments
186186
<> goOthers (o `HM.difference` HM.fromList comments)
187187
<> B.byteString footerHelp
188+
<> "\n"
188189

189190
goComment o (name, comment) =
190191
case (convert <$> HM.lookup name o) <|> nonPresentValue name of

0 commit comments

Comments
 (0)