Skip to content

Commit 4256be7

Browse files
committed
fixed: terminating is newline
`~/.stack/config.yaml` and `stack.yaml` is not terminating by newline. It is not compliance POSIX. [Definitions](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206) I can not fix last template file do not terminate by newline. This is project-templates bug.
1 parent bdafa1a commit 4256be7

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)