Skip to content

Commit ecbecdb

Browse files
committed
fix: revert providerId -> pid
1 parent b93ef4e commit ecbecdb

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

commands/add.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,17 @@ const choices = Object.entries(providers)
3838
/** @param {string | undefined} providerId */
3939
export async function action(providerId) {
4040
try {
41-
const pid =
42-
providerId ??
43-
(await select({
44-
message: "What provider do you want to set up?",
45-
choices: choices,
46-
}))
47-
48-
const provider = providers[pid]
41+
providerId ??= await select({
42+
message: "What provider do you want to set up?",
43+
choices: choices,
44+
})
45+
46+
const provider = providers[providerId]
4947
if (!provider?.setupUrl) {
5048
console.error(
5149
y.red(
5250
`Missing instructions for ${
53-
provider?.name ?? pid
51+
provider?.name ?? providerId
5452
}.\nInstructions are available for: ${y.bold(
5553
choices.map((choice) => choice.name).join(", ")
5654
)}`
@@ -135,7 +133,7 @@ ${y.bold("Callback URL (copied to clipboard)")}: ${url}`
135133

136134
console.log(y.dim("Updating environment variable file..."))
137135

138-
const varPrefix = `AUTH_${pid.toUpperCase()}`
136+
const varPrefix = `AUTH_${providerId.toUpperCase()}`
139137
await updateEnvFile({
140138
[`${varPrefix}_ID`]: clientId,
141139
[`${varPrefix}_SECRET`]: clientSecret,

0 commit comments

Comments
 (0)