Skip to content

Commit 73fd44f

Browse files
committed
fix: saved uri exists logic for slugs
1 parent 16a5c09 commit 73fd44f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

extensions/cli/src/configLoader.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,15 @@ function determineConfigSource(
102102
const savedUri = getConfigUri(authConfig);
103103

104104
if (savedUri) {
105-
if (
106-
fs.existsSync(
107-
savedUri.startsWith("file:") ? fileURLToPath(savedUri) : savedUri,
108-
)
109-
) {
110-
return { type: "saved-uri", uri: savedUri };
105+
if (savedUri.startsWith("file:")) {
106+
if (fs.existsSync(fileURLToPath(savedUri))) {
107+
return { type: "saved-uri", uri: savedUri };
108+
} else {
109+
logger.warn("Saved config URI does not exist: " + savedUri);
110+
}
111111
} else {
112-
logger.warn("Saved config URI does not exist: " + savedUri);
112+
// slug
113+
return { type: "saved-uri", uri: savedUri };
113114
}
114115
}
115116
}

0 commit comments

Comments
 (0)