File tree 3 files changed +8
-7
lines changed
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 {
48
48
readonly "reuse-window" ?: boolean
49
49
readonly "new-window" ?: boolean
50
50
51
- readonly "coder-bind" ?: OptionalString
51
+ readonly link ?: OptionalString
52
52
}
53
53
54
54
interface Option < T > {
@@ -164,7 +164,7 @@ const options: Options<Required<Args>> = {
164
164
log : { type : LogLevel } ,
165
165
verbose : { type : "boolean" , short : "vvv" , description : "Enable verbose logging." } ,
166
166
167
- "coder-bind" : {
167
+ link : {
168
168
type : OptionalString ,
169
169
description : `
170
170
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"
3
3
import path from "path"
4
4
import split2 from "split2"
5
5
6
+ // https://github.com/cdr/coder-cloud
6
7
const coderCloudAgent = path . resolve ( __dirname , "../../lib/coder-cloud-agent" )
7
8
8
9
function runAgent ( ...args : string [ ] ) : Promise < void > {
@@ -33,7 +34,7 @@ function runAgent(...args: string[]): Promise<void> {
33
34
}
34
35
35
36
export 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" )
37
38
logger . info ( "See https://github.com/cdr/code-server/discussions/2137" )
38
39
// addr needs to be in host:port format.
39
40
// So we trim the protocol.
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const version = pkg.version || "development"
36
36
const commit = pkg . commit || "development"
37
37
38
38
const main = async ( args : Args , configArgs : Args ) : Promise < void > => {
39
- if ( args [ "coder-bind" ] ) {
39
+ if ( args . link ) {
40
40
// If we're being exposed to the cloud, we listen on a random address and disable auth.
41
41
args = {
42
42
...args ,
@@ -46,7 +46,7 @@ const main = async (args: Args, configArgs: Args): Promise<void> => {
46
46
socket : undefined ,
47
47
cert : undefined ,
48
48
}
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 " )
50
50
}
51
51
52
52
if ( ! args . auth ) {
@@ -143,9 +143,9 @@ const main = async (args: Args, configArgs: Args): Promise<void> => {
143
143
logger . info ( `Opened ${ openAddress } ` )
144
144
}
145
145
146
- if ( args [ "coder-bind" ] ) {
146
+ if ( args . link ) {
147
147
try {
148
- await coderCloudBind ( serverAddress ! , args [ "coder-bind" ] . value )
148
+ await coderCloudBind ( serverAddress ! , args . link . value )
149
149
} catch ( err ) {
150
150
logger . error ( err . message )
151
151
ipcMain ( ) . exit ( 1 )
You can’t perform that action at this time.
0 commit comments