Skip to content

Commit fd4b784

Browse files
committed
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).
1 parent 7551509 commit fd4b784

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/node/main.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { coderCloudBind } from "./coder_cloud"
1010
import { commit, version } from "./constants"
1111
import { register } from "./routes"
1212
import { humanPath, isFile, open } from "./util"
13-
import { wrapper } from "./wrapper"
1413

1514
export const runVsCodeCli = (args: DefaultedArgs): void => {
1615
logger.debug("forking vs code cli...")
@@ -126,13 +125,8 @@ export const runCodeServer = async (args: DefaultedArgs): Promise<void> => {
126125
}
127126

128127
if (args.link) {
129-
try {
130-
await coderCloudBind(serverAddress.replace(/^https?:\/\//, ""), args.link.value)
131-
logger.info(" - Connected to cloud agent")
132-
} catch (err) {
133-
logger.error(err.message)
134-
wrapper.exit(1)
135-
}
128+
await coderCloudBind(serverAddress.replace(/^https?:\/\//, ""), args.link.value)
129+
logger.info(" - Connected to cloud agent")
136130
}
137131

138132
if (args.enable && args.enable.length > 0) {

0 commit comments

Comments
 (0)