File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export interface Args extends VsArgs {
4848 readonly "reuse-window" ?: boolean
4949 readonly "new-window" ?: boolean
5050
51- readonly "coder-bind" ?: OptionalString
51+ readonly link ?: OptionalString
5252}
5353
5454interface Option < T > {
@@ -164,7 +164,7 @@ const options: Options<Required<Args>> = {
164164 log : { type : LogLevel } ,
165165 verbose : { type : "boolean" , short : "vvv" , description : "Enable verbose logging." } ,
166166
167- "coder-bind" : {
167+ link : {
168168 type : OptionalString ,
169169 description : `
170170 Securely bind code-server via Coder Cloud with the passed name. You'll get a URL like
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { spawn } from "child_process"
33import path from "path"
44import split2 from "split2"
55
6+ // https://github.com/cdr/coder-cloud
67const coderCloudAgent = path . resolve ( __dirname , "../../lib/coder-cloud-agent" )
78
89function runAgent ( ...args : string [ ] ) : Promise < void > {
@@ -33,7 +34,7 @@ function runAgent(...args: string[]): Promise<void> {
3334}
3435
3536export function coderCloudBind ( csAddr : string , serverName = "" ) : Promise < void > {
36- logger . info ( "Remember --coder-bind is a beta feature and requires being accepted for testing" )
37+ logger . info ( "Remember --link is a beta feature and requires being accepted for testing" )
3738 logger . info ( "See https://github.com/cdr/code-server/discussions/2137" )
3839 // addr needs to be in host:port format.
3940 // So we trim the protocol.
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const version = pkg.version || "development"
3636const commit = pkg . commit || "development"
3737
3838const main = async ( args : Args , configArgs : Args ) : Promise < void > => {
39- if ( args [ "coder-bind" ] ) {
39+ if ( args . link ) {
4040 // If we're being exposed to the cloud, we listen on a random address and disable auth.
4141 args = {
4242 ...args ,
@@ -46,7 +46,7 @@ const main = async (args: Args, configArgs: Args): Promise<void> => {
4646 socket : undefined ,
4747 cert : undefined ,
4848 }
49- logger . info ( "coder-bind : disabling auth and listening on random localhost port" )
49+ logger . info ( "link : disabling auth and listening on random localhost port for cloud agent " )
5050 }
5151
5252 if ( ! args . auth ) {
@@ -143,9 +143,9 @@ const main = async (args: Args, configArgs: Args): Promise<void> => {
143143 logger . info ( `Opened ${ openAddress } ` )
144144 }
145145
146- if ( args [ "coder-bind" ] ) {
146+ if ( args . link ) {
147147 try {
148- await coderCloudBind ( serverAddress ! , args [ "coder-bind" ] . value )
148+ await coderCloudBind ( serverAddress ! , args . link . value )
149149 } catch ( err ) {
150150 logger . error ( err . message )
151151 ipcMain ( ) . exit ( 1 )
You can’t perform that action at this time.
0 commit comments