| 65 | |
| 66 | |
| 67 | function updatePlugin() { |
| 68 | try { |
| 69 | const prefix = execSync('npm prefix').toString().trim(); |
| 70 | const pluginPath = join(prefix, 'src/plugins/terminal'); |
| 71 | |
| 72 | execSync('cordova plugin remove com.foxdebug.acode.rk.exec.terminal', { stdio: 'inherit' }); |
| 73 | execSync(`cordova plugin add "${pluginPath}"`, { stdio: 'inherit' }); |
| 74 | |
| 75 | console.log('✅ Plugin updated successfully.'); |
| 76 | } catch (err) { |
| 77 | console.error(err.message); |
| 78 | process.exit(1); |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | async function handleAnswer(answer) { |
| 83 | answer = answer.trim().toLowerCase(); |