From f136593ccb2ae9b14c974832bc8008e6a9fda2dd Mon Sep 17 00:00:00 2001 From: Noah Zalev Date: Thu, 27 May 2021 22:44:20 -0400 Subject: [PATCH] Add version arg to selfupdate console cmd --- meshuser.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meshuser.js b/meshuser.js index 34c6976b..ca30526a 100644 --- a/meshuser.js +++ b/meshuser.js @@ -1188,7 +1188,15 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use } case 'serverupdate': { r = 'Performing server update...'; - if (parent.parent.performServerUpdate() == false) { r = 'Server self-update not possible.'; } + var version = null; + + if (cmdargs['_'].length > 0) { + version = cmdargs['_'][0]; + } + + if (parent.parent.performServerUpdate(version) == false) { + r = 'Server self-update not possible.'; + } break; } case 'print': {