[NOISSUE] Travis test, add detached.

This commit is contained in:
Pierce 2020-06-19 22:21:00 -04:00
parent 0905b4154d
commit 1a4983a8b3
4 changed files with 7 additions and 5 deletions

View file

@ -9,6 +9,7 @@ class MCLCore extends EventEmitter {
this.options = options
this.options.root = path.resolve(this.options.root)
this.options.overrides = {
detached: true,
...this.options.overrides,
url: {
meta: 'https://launchermeta.mojang.com',
@ -134,7 +135,7 @@ class MCLCore extends EventEmitter {
this.emit('debug', `[MCLC]: Launching with arguments ${launchArguments.join(' ')}`)
const minecraft = child.spawn(this.options.javaPath ? this.options.javaPath : 'java', launchArguments,
{ cwd: this.options.overrides.cwd || this.options.root })
{ cwd: this.options.overrides.cwd || this.options.root, detached: this.options.overrides.detached })
minecraft.stdout.on('data', (data) => this.emit('data', data.toString('utf-8')))
minecraft.stderr.on('data', (data) => this.emit('data', data.toString('utf-8')))
minecraft.on('close', (code) => this.emit('close', code))