checks if server jar exists

This commit is contained in:
Romain Beaumont 2015-03-29 18:12:54 +02:00
parent 4f3973db11
commit 8886cc5344

View file

@ -250,6 +250,11 @@ describe("client", function() {
batch.end(function(err) { batch.end(function(err) {
if (err) return done(err); if (err) return done(err);
//console.log(MC_SERVER_JAR); //console.log(MC_SERVER_JAR);
if (!fs.existsSync(MC_SERVER_JAR)) {
console.log("The file "+MC_SERVER_JAR+" doesn't exist.");
return done(new Error("The file "+MC_SERVER_JAR+" doesn't exist."));
}
mcServer = spawn('java', [ '-Dlog4j.configurationFile=server/server_debug.xml', '-jar', MC_SERVER_JAR, 'nogui'], { mcServer = spawn('java', [ '-Dlog4j.configurationFile=server/server_debug.xml', '-jar', MC_SERVER_JAR, 'nogui'], {
stdio: 'pipe', stdio: 'pipe',
cwd: MC_SERVER_PATH, cwd: MC_SERVER_PATH,