1
1
import { field , logger } from "@coder/logger"
2
2
import http from "http"
3
- import * as os from "os"
4
3
import { Disposable } from "../common/emitter"
5
4
import { plural } from "../common/util"
6
5
import { createApp , ensureAddress } from "./app"
7
6
import { AuthType , DefaultedArgs , Feature , SpawnCodeCli , toCodeArgs , UserProvidedArgs } from "./cli"
8
7
import { commit , version } from "./constants"
9
8
import { register } from "./routes"
10
- import { humanPath , isDirectory , loadAMDModule , open } from "./util"
9
+ import { isDirectory , loadAMDModule , open } from "./util"
11
10
12
11
/**
13
12
* Return true if the user passed an extension-related VS Code flag.
@@ -109,8 +108,8 @@ export const runCodeServer = async (
109
108
) : Promise < { dispose : Disposable [ "dispose" ] ; server : http . Server } > => {
110
109
logger . info ( `code-server ${ version } ${ commit } ` )
111
110
112
- logger . info ( `Using user-data-dir ${ humanPath ( os . homedir ( ) , args [ "user-data-dir" ] ) } ` )
113
- logger . trace ( `Using extensions-dir ${ humanPath ( os . homedir ( ) , args [ "extensions-dir" ] ) } ` )
111
+ logger . info ( `Using user-data-dir ${ args [ "user-data-dir" ] } ` )
112
+ logger . trace ( `Using extensions-dir ${ args [ "extensions-dir" ] } ` )
114
113
115
114
if ( args . auth === AuthType . Password && ! args . password && ! args [ "hashed-password" ] ) {
116
115
throw new Error (
@@ -123,7 +122,7 @@ export const runCodeServer = async (
123
122
const serverAddress = ensureAddress ( app . server , protocol )
124
123
const disposeRoutes = await register ( app , args )
125
124
126
- logger . info ( `Using config file ${ humanPath ( os . homedir ( ) , args . config ) } ` )
125
+ logger . info ( `Using config file ${ args . config } ` )
127
126
logger . info ( `${ protocol . toUpperCase ( ) } server listening on ${ serverAddress . toString ( ) } ` )
128
127
if ( args . auth === AuthType . Password ) {
129
128
logger . info ( " - Authentication is enabled" )
@@ -132,14 +131,14 @@ export const runCodeServer = async (
132
131
} else if ( args . usingEnvHashedPassword ) {
133
132
logger . info ( " - Using password from $HASHED_PASSWORD" )
134
133
} else {
135
- logger . info ( ` - Using password from ${ humanPath ( os . homedir ( ) , args . config ) } ` )
134
+ logger . info ( ` - Using password from ${ args . config } ` )
136
135
}
137
136
} else {
138
137
logger . info ( " - Authentication is disabled" )
139
138
}
140
139
141
140
if ( args . cert ) {
142
- logger . info ( ` - Using certificate for HTTPS: ${ humanPath ( os . homedir ( ) , args . cert . value ) } ` )
141
+ logger . info ( ` - Using certificate for HTTPS: ${ args . cert . value } ` )
143
142
} else {
144
143
logger . info ( " - Not serving HTTPS" )
145
144
}
0 commit comments