Skip to content

Commit

Permalink
Merge pull request #3983 from ncaq/fix-no-newline-terminating-file
Browse files Browse the repository at this point in the history
fixed: terminating is newline
  • Loading branch information
borsboom committed Apr 24, 2018
2 parents 3652533 + 4256be7 commit 7e6e6a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Other enhancements:

Bug fixes:

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

## v1.7.0.3 (release candidate)

Expand Down
1 change: 1 addition & 0 deletions src/Stack/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -964,4 +964,5 @@ defaultConfigYaml = S.intercalate "\n"
, "# author-email:"
, "# copyright:"
, "# github-username:"
, ""
]
1 change: 1 addition & 0 deletions src/Stack/Init.hs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ renderStackYaml p ignoredPackages dupPackages =
<> F.foldMap (goComment o) comments
<> goOthers (o `HM.difference` HM.fromList comments)
<> B.byteString footerHelp
<> "\n"

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

0 comments on commit 7e6e6a4

Please sign in to comment.