mirror of https://git.tuxpa.in/a/code-server.git
parent
d81d5f499f
commit
b8e6369fbe
|
@ -101,11 +101,8 @@ const startVscode = async (): Promise<void | void[]> => {
|
||||||
options.password = await generatePassword();
|
options.password = await generatePassword();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!options.certKey && typeof options.certKey !== "undefined") {
|
// This is necessary since VS Code filters out empty strings.
|
||||||
throw new Error(`--cert-key cannot be blank`);
|
if (typeof options.cert === "undefined" && process.argv.indexOf("--cert") !== -1) {
|
||||||
} else if (options.certKey && !options.cert) {
|
|
||||||
throw new Error(`--cert-key was provided but --cert was not`);
|
|
||||||
} if (!options.cert && typeof options.cert !== "undefined") {
|
|
||||||
const { cert, certKey } = await generateCertificate();
|
const { cert, certKey } = await generateCertificate();
|
||||||
options.cert = cert;
|
options.cert = cert;
|
||||||
options.certKey = certKey;
|
options.certKey = certKey;
|
||||||
|
|
Loading…
Reference in New Issue