From 92aae98dafc54117411efeb5f85e0d57dcb3daaf Mon Sep 17 00:00:00 2001 From: Ryan Lucia Date: Sun, 6 Jan 2019 20:30:49 -0500 Subject: [PATCH] Separate file handler method calls --- modules/DependencyControl.moon | 2 +- modules/DependencyControl/Logger.moon | 3 ++- modules/DependencyControl/UpdateFeed.moon | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/DependencyControl.moon b/modules/DependencyControl.moon index 9f9910c..fb4fed4 100644 --- a/modules/DependencyControl.moon +++ b/modules/DependencyControl.moon @@ -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", diff --git a/modules/DependencyControl/Logger.moon b/modules/DependencyControl/Logger.moon index 17a5abf..86d9ac1 100644 --- a/modules/DependencyControl/Logger.moon +++ b/modules/DependencyControl/Logger.moon @@ -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 ':', ': '}" diff --git a/modules/DependencyControl/UpdateFeed.moon b/modules/DependencyControl/UpdateFeed.moon index e119c61..24f8aff 100644 --- a/modules/DependencyControl/UpdateFeed.moon +++ b/modules/DependencyControl/UpdateFeed.moon @@ -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