fix: saved uri exists logic for slugs
This commit is contained in:
parent
16a5c09430
commit
73fd44f7ff
1 changed files with 8 additions and 7 deletions
|
|
@ -102,14 +102,15 @@ function determineConfigSource(
|
|||
const savedUri = getConfigUri(authConfig);
|
||||
|
||||
if (savedUri) {
|
||||
if (
|
||||
fs.existsSync(
|
||||
savedUri.startsWith("file:") ? fileURLToPath(savedUri) : savedUri,
|
||||
)
|
||||
) {
|
||||
return { type: "saved-uri", uri: savedUri };
|
||||
if (savedUri.startsWith("file:")) {
|
||||
if (fs.existsSync(fileURLToPath(savedUri))) {
|
||||
return { type: "saved-uri", uri: savedUri };
|
||||
} else {
|
||||
logger.warn("Saved config URI does not exist: " + savedUri);
|
||||
}
|
||||
} else {
|
||||
logger.warn("Saved config URI does not exist: " + savedUri);
|
||||
// slug
|
||||
return { type: "saved-uri", uri: savedUri };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue