Last active
September 20, 2019 08:40
-
-
Save J-Cake/5bf7f023e0ddd4173cb1b1854f2d2e2c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {exec} = require('child_process'); | |
function spawn(...args) { | |
return new Promise(function (resolve, reject) { | |
const process = exec(`java -jar gp.jar --delete D27600008501 --key ${lockKey}`, function (err, stdout, stderr) { | |
if (err) | |
return reject(err); | |
}); | |
process.on('exit', code => resolve(code)); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment