We need to move createAdminUser out of nimwc_main.nim and use it in nimwc.nim. If it fails, due to doAssert, the launcher function will restart nimwc_main and try again again. The end user will also have a hard time seeing the error message due to the verbosity of firejail.
Moving it til nimwc.nim will require to establish a DB connection already there. I have changed doAssert to if and inserted a sleep and return as a temporary solution.
# Add admin user
if "newuser" in commandLineParams():
createAdminUser(db, commandLineParams())
# TODO
if iName.len < 3:
error("Missing or invalid Name to create Admin user: " & iName)
sleep(3000)
return
We need to move
createAdminUser
out of nimwc_main.nim and use it in nimwc.nim. If it fails, due todoAssert
, the launcher function will restart nimwc_main and try again again. The end user will also have a hard time seeing the error message due to the verbosity of firejail.Moving it til nimwc.nim will require to establish a DB connection already there. I have changed
doAssert
toif
and inserted asleep
andreturn
as a temporary solution.