From 20e70cfa053e5f3847ab7409e5cc9abd8f0c8187 Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 5 May 2021 11:56:19 -0500 Subject: [PATCH] Remove try from main All it does is log and exit which is what the caller will be doing on an error anyway (see entry). --- src/node/main.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/node/main.ts b/src/node/main.ts index 240831c2..1409a440 100644 --- a/src/node/main.ts +++ b/src/node/main.ts @@ -10,7 +10,6 @@ import { coderCloudBind } from "./coder_cloud" import { commit, version } from "./constants" import { register } from "./routes" import { humanPath, isFile, open } from "./util" -import { wrapper } from "./wrapper" export const runVsCodeCli = (args: DefaultedArgs): void => { logger.debug("forking vs code cli...") @@ -126,13 +125,8 @@ export const runCodeServer = async (args: DefaultedArgs): Promise => { } if (args.link) { - try { - await coderCloudBind(serverAddress.replace(/^https?:\/\//, ""), args.link.value) - logger.info(" - Connected to cloud agent") - } catch (err) { - logger.error(err.message) - wrapper.exit(1) - } + await coderCloudBind(serverAddress.replace(/^https?:\/\//, ""), args.link.value) + logger.info(" - Connected to cloud agent") } if (args.enable && args.enable.length > 0) {