未验证 提交 20e70cfa 编写于 作者: A Asher

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).
上级 c96fb653
......@@ -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<void> => {
}
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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册