@@ -28,7 +28,7 @@ function getLCUExecutableFromProcess() {
28
28
29
29
async function duplicateSystemYaml ( ) {
30
30
const LCUExePath = await getLCUExecutableFromProcess ( ) ;
31
- const LCUDir = path . dirname ( LCUExePath ) ;
31
+ const LCUDir = IS_WIN ? path . dirname ( LCUExePath ) : path . dirname ( LCUExePath ) + '/../../..' ;
32
32
33
33
const originalSystemFile = path . join ( LCUDir , 'system.yaml' ) ;
34
34
const overrideSystemFile = path . join ( LCUDir , 'Config' , 'rift-explorer' , 'system.yaml' ) ;
@@ -51,8 +51,9 @@ async function duplicateSystemYaml() {
51
51
function restartLCUWithOverride ( LCUData ) {
52
52
return new Promise ( async ( resolve , reject ) => {
53
53
const LCUExePath = await getLCUExecutableFromProcess ( ) ;
54
- const LCUDir = path . dirname ( LCUExePath ) ;
54
+ const LCUDir = IS_WIN ? path . dirname ( LCUExePath ) : path . dirname ( LCUExePath ) + '/../../..' ;
55
55
const overrideSystemFile = path . join ( LCUDir , 'Config' , 'rift-explorer' , 'system.yaml' ) ;
56
+
56
57
const { username, password, address, port } = LCUData ;
57
58
58
59
await requestPromise ( {
@@ -64,6 +65,7 @@ function restartLCUWithOverride(LCUData) {
64
65
// Give it some time to do cleanup
65
66
setTimeout ( ( ) => {
66
67
const leagueProcess = spawn ( LCUExePath . trim ( ) , [ `--system-yaml-override=${ overrideSystemFile } ` ] , {
68
+ cwd : LCUDir ,
67
69
detached : true ,
68
70
stdio : 'ignore'
69
71
} ) ;
0 commit comments