Skip to content

Commit

Permalink
Separate file handler method calls
Browse files Browse the repository at this point in the history
  • Loading branch information
CoffeeFlux committed Jan 8, 2019
1 parent 01106ed commit 92aae98
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/DependencyControl.moon
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ class DependencyControl

rec = DependencyControl{
name: "DependencyControl",
version: "0.6.3",
version: "0.6.4",
description: "Provides script management and auto-updating for Aegisub macros and modules.",
author: "line0",
url: "http://github.com/TypesettingTools/DependencyControl",
Expand Down
3 changes: 2 additions & 1 deletion modules/DependencyControl/Logger.moon
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ class Logger
@handle = io.open(@fileName, "a") unless @handle
linePre = @lastHadLineFeed and "#{indentStr}[#{levels[level+1]\upper!}] #{os.date '%H:%M:%S'} #{show and '+' or '•'} " or ""
line = table.concat({linePre, @usePrefixFile and prefix or "", msg, lineFeed})
@handle\write(line)\flush!
@handle\write(line)
@handle\flush!

-- for some reason the stack trace gets swallowed when not doing the replace
assert level > 1,"#{indentStr}Error: #{prefixWin}#{msg\gsub ':', ': '}"
Expand Down
3 changes: 2 additions & 1 deletion modules/DependencyControl/UpdateFeed.moon
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ class UpdateFeed

if @@dumpExpanded
handle = io.open @fileName\gsub(".json$", ".exp.json"), "w"
handle\write(json.encode @data)\close!
handle\write(json.encode @data)
handle\close!

return @data

Expand Down

0 comments on commit 92aae98

Please sign in to comment.