facult 2.13.3 → 2.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/self-update.ts +14 -0
package/package.json
CHANGED
package/src/self-update.ts
CHANGED
|
@@ -194,6 +194,9 @@ async function activeFcltUsesMiseNpmFacult(): Promise<boolean> {
|
|
|
194
194
|
if (looksLikeMiseNpmFacultExecutable(fcltPath ?? "")) {
|
|
195
195
|
return true;
|
|
196
196
|
}
|
|
197
|
+
if (await miseHasCurrentFacultTool()) {
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
197
200
|
if (!looksLikeMiseShim(fcltPath)) {
|
|
198
201
|
return false;
|
|
199
202
|
}
|
|
@@ -214,6 +217,17 @@ async function activeFcltUsesMiseNpmFacult(): Promise<boolean> {
|
|
|
214
217
|
return looksLikeMiseNpmFacultExecutable(stdout.trim());
|
|
215
218
|
}
|
|
216
219
|
|
|
220
|
+
async function miseHasCurrentFacultTool(): Promise<boolean> {
|
|
221
|
+
const proc = Bun.spawn({
|
|
222
|
+
cmd: ["mise", "current", `npm:${PACKAGE_NAME}`],
|
|
223
|
+
stdin: "ignore",
|
|
224
|
+
stdout: "ignore",
|
|
225
|
+
stderr: "ignore",
|
|
226
|
+
env: process.env,
|
|
227
|
+
});
|
|
228
|
+
return (await proc.exited) === 0;
|
|
229
|
+
}
|
|
230
|
+
|
|
217
231
|
function resolvePlatformTarget(): {
|
|
218
232
|
platform: string;
|
|
219
233
|
arch: string;
|