UNPKG

dotcli-test

Version:

Official command-line tool to manage dotCMS content.

14 lines (12 loc) 382 B
const { execSync } = require('child_process'); const packageName = 'dotcli-test'; const target = execSync(`whereis ${packageName}`).toString().trim(); const path = target.split(' ')[1]; if (path) { execSync('unlink ' + path); console.log(`Uninstalled ${packageName} successfully`); process.exit(0); } else { console.log(`${packageName} not found.`); process.exit(1); }