4runr-os 2.1.42 ā 2.1.46
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/scripts/setup.js +31 -16
package/package.json
CHANGED
package/scripts/setup.js
CHANGED
|
@@ -316,21 +316,31 @@ if (isWindows && rustInstalled && rustNeedsGNU) {
|
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
// Continue with rest of setup (outside Windows-specific block)
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
console.log('\nš¦ Checking 4runr-os installation...');
|
|
320
|
+
try {
|
|
321
|
+
// Check if 4r command exists by checking npm global bin
|
|
322
|
+
const npmPrefix = execSync('npm config get prefix', { encoding: 'utf-8' }).trim();
|
|
323
|
+
const globalBinPath = isWindows
|
|
324
|
+
? path.join(npmPrefix, '4r.cmd')
|
|
325
|
+
: path.join(npmPrefix, 'bin', '4r');
|
|
326
|
+
|
|
327
|
+
if (fs.existsSync(globalBinPath)) {
|
|
321
328
|
console.log('ā
4runr-os is installed');
|
|
329
|
+
} else {
|
|
330
|
+
throw new Error('4r not found');
|
|
331
|
+
}
|
|
332
|
+
} catch {
|
|
333
|
+
console.log('ā ļø 4runr-os not found in PATH');
|
|
334
|
+
console.log(' Installing 4runr-os...');
|
|
335
|
+
try {
|
|
336
|
+
execSync('npm install -g 4runr-os@latest', { stdio: 'inherit' });
|
|
337
|
+
console.log('ā
4runr-os installed');
|
|
322
338
|
} catch {
|
|
323
|
-
console.
|
|
324
|
-
console.
|
|
325
|
-
|
|
326
|
-
execSync('npm install -g 4runr-os@latest', { stdio: 'inherit' });
|
|
327
|
-
console.log('ā
4runr-os installed');
|
|
328
|
-
} catch {
|
|
329
|
-
console.error('ā Failed to install 4runr-os');
|
|
330
|
-
console.error(' Run manually: npm install -g 4runr-os@latest');
|
|
331
|
-
process.exit(1);
|
|
332
|
-
}
|
|
339
|
+
console.error('ā Failed to install 4runr-os');
|
|
340
|
+
console.error(' Run manually: npm install -g 4runr-os@latest');
|
|
341
|
+
process.exit(1);
|
|
333
342
|
}
|
|
343
|
+
}
|
|
334
344
|
|
|
335
345
|
// Verify mk3-tui binary (check global install location)
|
|
336
346
|
let mk3Dir = null;
|
|
@@ -376,8 +386,13 @@ if (isWindows && rustInstalled && rustNeedsGNU) {
|
|
|
376
386
|
}
|
|
377
387
|
|
|
378
388
|
// Run the setup
|
|
379
|
-
runSetup()
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
389
|
+
runSetup()
|
|
390
|
+
.then(() => {
|
|
391
|
+
// Setup completed successfully
|
|
392
|
+
process.exit(0);
|
|
393
|
+
})
|
|
394
|
+
.catch((error) => {
|
|
395
|
+
console.error('\nā Setup failed:', error);
|
|
396
|
+
process.exit(1);
|
|
397
|
+
});
|
|
383
398
|
|