Fixed path undefined error in generate-keys with account type

This commit is contained in:
Jonathan Barrow 2022-10-01 10:56:06 -04:00
parent 540c11f4aa
commit cf292ed661
No known key found for this signature in database
GPG key ID: E86E9FE9049C741F

View file

@ -47,7 +47,13 @@ async function main() {
return;
}
const path = `${__dirname}/certs/${type}/${name}`;
let path;
if (type === 'account') {
path = `${__dirname}/certs/service/account`;
} else {
path = `${__dirname}/certs/${type}/${name}`;
}
if (fs.pathExistsSync(path)) {
const overwrite = await yesno({