Skip to content

Commit f8be358

Browse files
committed
Updater\AddTask(): also return an error code if the generation of a new UpdateTask failed
1 parent 7220b3d commit f8be358

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/DependencyControl/Updater.moon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class UpdateTask extends UpdaterBase
9999
@status = nil
100100
@targetVersion = @record\getVersionNumber targetVersion
101101

102-
return nil, -1 unless @@config.c.updaterEnabled
102+
return nil, -1 unless @@config.c.updaterEnabled -- TODO: check if this even works
103103
return nil, -2 unless @record\validateNamespace!
104104

105105
set: (targetVersion, @addFeeds, @exhaustive, @channel, @optional) =>
@@ -430,7 +430,7 @@ class Updater extends UpdaterBase
430430
if task
431431
return task\set targetVersion, addFeeds, exhaustive, channel, optional
432432
else
433-
task = UpdateTask record, targetVersion, addFeeds, exhaustive, channel, optional, @
433+
task, err = UpdateTask record, targetVersion, addFeeds, exhaustive, channel, optional, @
434434
@tasks[record.type][record.namespace] = task
435435
return task, err
436436

0 commit comments

Comments
 (0)