mirror of
https://github.com/coder/code-server.git
synced 2024-12-24 02:01:46 +03:00
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).
This commit is contained in:
parent
c96fb65308
commit
20e70cfa05
@ -10,7 +10,6 @@ import { coderCloudBind } from "./coder_cloud"
|
|||||||
import { commit, version } from "./constants"
|
import { commit, version } from "./constants"
|
||||||
import { register } from "./routes"
|
import { register } from "./routes"
|
||||||
import { humanPath, isFile, open } from "./util"
|
import { humanPath, isFile, open } from "./util"
|
||||||
import { wrapper } from "./wrapper"
|
|
||||||
|
|
||||||
export const runVsCodeCli = (args: DefaultedArgs): void => {
|
export const runVsCodeCli = (args: DefaultedArgs): void => {
|
||||||
logger.debug("forking vs code cli...")
|
logger.debug("forking vs code cli...")
|
||||||
@ -126,13 +125,8 @@ export const runCodeServer = async (args: DefaultedArgs): Promise<void> => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (args.link) {
|
if (args.link) {
|
||||||
try {
|
await coderCloudBind(serverAddress.replace(/^https?:\/\//, ""), args.link.value)
|
||||||
await coderCloudBind(serverAddress.replace(/^https?:\/\//, ""), args.link.value)
|
logger.info(" - Connected to cloud agent")
|
||||||
logger.info(" - Connected to cloud agent")
|
|
||||||
} catch (err) {
|
|
||||||
logger.error(err.message)
|
|
||||||
wrapper.exit(1)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.enable && args.enable.length > 0) {
|
if (args.enable && args.enable.length > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user