Skip to content

Commit

Permalink
0.8.10: fix .cfg writes w/o trailing nl
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Jul 6, 2020
1 parent bed5619 commit 06cf9ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion nimph.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.8.9"
version = "0.8.10"
author = "disruptek"
description = "nim package handler from the future"
license = "MIT"
Expand Down
10 changes: 5 additions & 5 deletions src/nimph/config.nim
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,13 @@ proc appendConfig*(path: Target; config: string): bool =
# open our temp file for writing
var
writer = temp.open(fmAppend)
# but remember to close the temp file in any event
defer:
try:
# add our new content with a trailing newline
writer.writeLine "# added by nimph:\n" & config
finally:
# remember to close the temp file in any event
writer.close

# add our new content with a trailing newline
writer.writeLine config

# make sure the compiler can parse our new config
if parseConfigFile(temp).isNone:
break complete
Expand Down

0 comments on commit 06cf9ce

Please sign in to comment.