Merge branch 'Vencord:main' into screenaudio-dev
This commit is contained in:
		
						commit
						4dcfe6784a
					
				
					 1 changed files with 10 additions and 2 deletions
				
			
		|  | @ -4,7 +4,8 @@ | |||
|  * Copyright (c) 2023 Vendicated and Vencord contributors | ||||
|  */ | ||||
| 
 | ||||
| import { app, dialog, session, shell } from "electron"; | ||||
| import { execFile } from "child_process"; | ||||
| import { app, dialog, RelaunchOptions, session, shell } from "electron"; | ||||
| import { mkdirSync, readFileSync, watch } from "fs"; | ||||
| import { open, readFile } from "fs/promises"; | ||||
| import { release } from "os"; | ||||
|  | @ -45,7 +46,14 @@ handle(IpcEvents.SET_SETTINGS, (_, settings: typeof Settings.store, path?: strin | |||
| }); | ||||
| 
 | ||||
| handle(IpcEvents.RELAUNCH, () => { | ||||
|     app.relaunch(); | ||||
|     const options: RelaunchOptions = { | ||||
|         args: process.argv.slice(1).concat(["--relaunch"]) | ||||
|     }; | ||||
|     if (app.isPackaged && process.env.APPIMAGE) { | ||||
|         execFile(process.env.APPIMAGE, options.args); | ||||
|     } else { | ||||
|         app.relaunch(options); | ||||
|     } | ||||
|     app.exit(); | ||||
| }); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 kaitlynkitty
						kaitlynkitty