You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

10 lines
374 B

const { execSync } = require('child_process');
// 找 lanhu-mcp 可执行文件位置
for (const cmd of ['where lanhu-mcp', 'npm root -g', 'npm ls -g --depth=0']) {
try {
console.log('== ' + cmd + ' ==');
console.log(execSync(cmd, { encoding: 'utf8', timeout: 15000 }));
} catch (e) {
console.log('(failed: ' + String(e.message).split('\n')[0] + ')');
}
}