@@ -35,11 +35,11 @@ try {
3535const version = pkg . version || "development"
3636const commit = pkg . commit || "development"
3737
38- const main = async ( args : Args , cliArgs : Args , configArgs : Args ) : Promise < void > => {
38+ const main = async ( args : Args , configArgs : Args ) : Promise < void > => {
3939 if ( args [ "coder-bind" ] ) {
4040 // If we're being exposed to the cloud, we listen on a random address and disable auth.
41- cliArgs = {
42- ...cliArgs ,
41+ args = {
42+ ...args ,
4343 host : "localhost" ,
4444 port : 0 ,
4545 auth : AuthType . None ,
@@ -64,7 +64,7 @@ const main = async (args: Args, cliArgs: Args, configArgs: Args): Promise<void>
6464 if ( args . auth === AuthType . Password && ! password ) {
6565 throw new Error ( "Please pass in a password via the config file or $PASSWORD" )
6666 }
67- const [ host , port ] = bindAddrFromAllSources ( cliArgs , configArgs )
67+ const [ host , port ] = bindAddrFromAllSources ( args , configArgs )
6868
6969 // Spawn the main HTTP server.
7070 const options : HttpServerOptions = {
@@ -153,21 +153,21 @@ const main = async (args: Args, cliArgs: Args, configArgs: Args): Promise<void>
153153}
154154
155155async function entry ( ) : Promise < void > {
156- const tryParse = async ( ) : Promise < [ Args , Args , Args ] > => {
156+ const tryParse = async ( ) : Promise < [ Args , Args ] > => {
157157 try {
158158 const cliArgs = parse ( process . argv . slice ( 2 ) )
159159 const configArgs = await readConfigFile ( cliArgs . config )
160160 // This prioritizes the flags set in args over the ones in the config file.
161161 let args = Object . assign ( configArgs , cliArgs )
162162 args = await setDefaults ( args )
163- return [ args , cliArgs , configArgs ]
163+ return [ args , configArgs ]
164164 } catch ( error ) {
165165 console . error ( error . message )
166166 process . exit ( 1 )
167167 }
168168 }
169169
170- const [ args , cliArgs , configArgs ] = await tryParse ( )
170+ const [ args , configArgs ] = await tryParse ( )
171171 if ( args . help ) {
172172 console . log ( "code-server" , version , commit )
173173 console . log ( "" )
@@ -262,7 +262,7 @@ async function entry(): Promise<void> {
262262 vscode . write ( JSON . stringify ( pipeArgs ) )
263263 vscode . end ( )
264264 } else {
265- wrap ( ( ) => main ( args , cliArgs , configArgs ) )
265+ wrap ( ( ) => main ( args , configArgs ) )
266266 }
267267}
268268
0 commit comments