mirror of
https://github.com/coder/code-server.git
synced 2026-05-28 17:43:51 +02:00
feat(cli): add tests for password, hashed-password
This commit is contained in:
@@ -310,10 +310,12 @@ export const parse = (
|
|||||||
throw error(`Unknown option ${arg}`)
|
throw error(`Unknown option ${arg}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO@jsjoeio add test for this if block
|
||||||
if (key === "password" && !opts?.configFile) {
|
if (key === "password" && !opts?.configFile) {
|
||||||
throw new Error("--password can only be set in the config file or passed in via $PASSWORD")
|
throw new Error("--password can only be set in the config file or passed in via $PASSWORD")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO@jsjoeio add test for this if block
|
||||||
if (key === "hashed-password" && !opts?.configFile) {
|
if (key === "hashed-password" && !opts?.configFile) {
|
||||||
throw new Error("--hashed-password can only be set in the config file or passed in via $HASHED_PASSWORD")
|
throw new Error("--hashed-password can only be set in the config file or passed in via $HASHED_PASSWORD")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user