#442 return rather than assert on configuration error
This commit is contained in:
@@ -21,7 +21,7 @@ local supervisor = require("supervisor.supervisor")
|
||||
|
||||
local svsessions = require("supervisor.session.svsessions")
|
||||
|
||||
local SUPERVISOR_VERSION = "v1.2.9"
|
||||
local SUPERVISOR_VERSION = "v1.2.10"
|
||||
|
||||
local println = util.println
|
||||
local println_ts = util.println_ts
|
||||
@@ -34,9 +34,13 @@ if not supervisor.load_config() then
|
||||
-- try to reconfigure (user action)
|
||||
local success, error = configure.configure(true)
|
||||
if success then
|
||||
assert(supervisor.load_config(), "failed to load valid configuration")
|
||||
if not supervisor.load_config() then
|
||||
println("failed to load a valid configuration, please reconfigure")
|
||||
return
|
||||
end
|
||||
else
|
||||
assert(success, "supervisor configuration error: " .. error)
|
||||
println("configuration error: " .. error)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user