Skip to content

Commit

Permalink
Don't close the client if Rift Explorer exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Pupix committed Jun 10, 2019
1 parent 0bb7856 commit 87345d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rift-explorer",
"version": "6.0.1",
"version": "6.1.0",
"description": "Always up to date documentation for the League Client API",
"main": "app.js",
"scripts": {
Expand Down
9 changes: 6 additions & 3 deletions util.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const cp = require('child_process');
const path = require('path');
const fs = require('fs-extra');
const yaml = require('yaml');
const { execFile } = require('child_process');
const { spawn } = require('child_process');
const requestPromise = require('request-promise');

const IS_WIN = process.platform === 'win32';
Expand Down Expand Up @@ -63,9 +63,12 @@ function restartLCUWithOverride(LCUData) {

// Give it some time to do cleanup
setTimeout(() => {
execFile(LCUExePath.trim(), [`--system-yaml-override=${overrideSystemFile}`], {
maxBuffer: 1024 * 1024 * 1024 // 1GB
const leagueProcess = spawn(LCUExePath.trim(), [`--system-yaml-override=${overrideSystemFile}`], {
detached: true,
stdio: 'ignore'
});

leagueProcess.unref();
resolve();
}, 5000);
});
Expand Down

0 comments on commit 87345d9

Please sign in to comment.