From 545b5a513535dd11af505458b9744610b3a29692 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 13 Apr 2020 18:30:19 +0300 Subject: [PATCH] fix(cloudcmd) crash on check for update (#286) --- bin/cloudcmd.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cloudcmd.js b/bin/cloudcmd.js index b7201064..005c7f1b 100755 --- a/bin/cloudcmd.js +++ b/bin/cloudcmd.js @@ -6,6 +6,7 @@ const Info = require('../package'); const DIR_SERVER = '../server/'; const {promisify} = require('util'); +const tryToCatch = require('try-to-catch'); const exit = require(DIR_SERVER + 'exit'); const { @@ -147,7 +148,6 @@ async function main() { if (args.repl) repl(); - checkUpdate(); port(args.port); config('name', args.name); @@ -216,6 +216,7 @@ async function main() { config.write(); start(options, config); + await tryToCatch(checkUpdate); } function validateRoot(root, config) {