@praise166/vire 0.1.6 → 0.1.7
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/dist/vire.js +6 -3
- package/package.json +1 -1
package/dist/vire.js
CHANGED
|
@@ -402,15 +402,18 @@ async function saveSession(token, user) {
|
|
|
402
402
|
async function ensureReleaseBinary(downloadedRuntime) {
|
|
403
403
|
if (downloadedRuntime)
|
|
404
404
|
return downloadedRuntime;
|
|
405
|
-
const updateBinary = await newestDownloadedRuntime();
|
|
406
|
-
if (updateBinary)
|
|
407
|
-
return updateBinary;
|
|
408
405
|
const exe = process.platform === 'win32' ? 'vire.exe' : 'vire';
|
|
409
406
|
const binary = join(root, 'target', 'release', exe);
|
|
410
407
|
let exists = true;
|
|
411
408
|
await access(binary).catch(() => {
|
|
412
409
|
exists = false;
|
|
413
410
|
});
|
|
411
|
+
if (exists && process.env.VIRE_USE_UPDATED_RUNTIME !== 'true') {
|
|
412
|
+
return binary;
|
|
413
|
+
}
|
|
414
|
+
const updateBinary = await newestDownloadedRuntime();
|
|
415
|
+
if (updateBinary)
|
|
416
|
+
return updateBinary;
|
|
414
417
|
if (!exists) {
|
|
415
418
|
throw new Error('runtime missing; upload the exe to r2 or place it in updates');
|
|
416
419
|
}
|