Files
atom/script/lib/kill-running-atom-instances.js
2019-05-31 18:33:56 +02:00

15 lines
425 B
JavaScript

const childProcess = require('child_process');
const CONFIG = require('../config.js');
module.exports = function() {
if (process.platform === 'win32') {
// Use START as a way to ignore error if Atom.exe isnt running
childProcess.execSync(
`START taskkill /F /IM ${CONFIG.appMetadata.productName}.exe`
);
} else {
childProcess.execSync(`pkill -9 ${CONFIG.appMetadata.productName} || true`);
}
};