mirror of
https://github.com/coder/code-server.git
synced 2026-05-05 03:55:18 +02:00
feat(testing): refactor humanPath and add tests (#4511)
* feat: add test for humanPath * refactor: make humanPath pure and pass in homedir
This commit is contained in:
@@ -606,7 +606,7 @@ export async function readConfigFile(configPath?: string): Promise<ConfigArgs> {
|
||||
await fs.writeFile(configPath, defaultConfigFile(generatedPassword), {
|
||||
flag: "wx", // wx means to fail if the path exists.
|
||||
})
|
||||
logger.info(`Wrote default config file to ${humanPath(configPath)}`)
|
||||
logger.info(`Wrote default config file to ${humanPath(os.homedir(), configPath)}`)
|
||||
} catch (error: any) {
|
||||
// EEXIST is fine; we don't want to overwrite existing configurations.
|
||||
if (error.code !== "EEXIST") {
|
||||
|
||||
Reference in New Issue
Block a user