4runr-os 2.1.45 ā 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 +20 -11
package/package.json
CHANGED
package/scripts/setup.js
CHANGED
|
@@ -318,20 +318,29 @@ if (isWindows && rustInstalled && rustNeedsGNU) {
|
|
|
318
318
|
// Continue with rest of setup (outside Windows-specific block)
|
|
319
319
|
console.log('\nš¦ Checking 4runr-os installation...');
|
|
320
320
|
try {
|
|
321
|
-
|
|
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)) {
|
|
322
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');
|
|
323
338
|
} catch {
|
|
324
|
-
console.
|
|
325
|
-
console.
|
|
326
|
-
|
|
327
|
-
execSync('npm install -g 4runr-os@latest', { stdio: 'inherit' });
|
|
328
|
-
console.log('ā
4runr-os installed');
|
|
329
|
-
} catch {
|
|
330
|
-
console.error('ā Failed to install 4runr-os');
|
|
331
|
-
console.error(' Run manually: npm install -g 4runr-os@latest');
|
|
332
|
-
process.exit(1);
|
|
333
|
-
}
|
|
339
|
+
console.error('ā Failed to install 4runr-os');
|
|
340
|
+
console.error(' Run manually: npm install -g 4runr-os@latest');
|
|
341
|
+
process.exit(1);
|
|
334
342
|
}
|
|
343
|
+
}
|
|
335
344
|
|
|
336
345
|
// Verify mk3-tui binary (check global install location)
|
|
337
346
|
let mk3Dir = null;
|