diff --git a/src/node/cli.ts b/src/node/cli.ts index d65397f58..0f3e20177 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -101,11 +101,8 @@ const startVscode = async (): Promise => { options.password = await generatePassword(); } - if (!options.certKey && typeof options.certKey !== "undefined") { - throw new Error(`--cert-key cannot be blank`); - } else if (options.certKey && !options.cert) { - throw new Error(`--cert-key was provided but --cert was not`); - } if (!options.cert && typeof options.cert !== "undefined") { + // This is necessary since VS Code filters out empty strings. + if (typeof options.cert === "undefined" && process.argv.indexOf("--cert") !== -1) { const { cert, certKey } = await generateCertificate(); options.cert = cert; options.certKey = certKey;