Archived
1
0

Kill VS Code when process exits

This is to ensure it doesn't hang around.
This commit is contained in:
Asher 2020-11-03 17:14:04 -06:00
parent 34225e2bdf
commit 396af23842
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
2 changed files with 2 additions and 4 deletions

View File

@ -102,10 +102,6 @@ const main = async (args: DefaultedArgs): Promise<void> => {
throw new Error("Please pass in a password via the config file or $PASSWORD") throw new Error("Please pass in a password via the config file or $PASSWORD")
} }
ipcMain.onDispose(() => {
// TODO: register disposables
})
const [app, server] = await createApp(args) const [app, server] = await createApp(args)
const serverAddress = ensureAddress(server) const serverAddress = ensureAddress(server)
await register(app, server, args) await register(app, server, args)

View File

@ -7,6 +7,7 @@ import { arrayify, generateUuid } from "../common/util"
import { rootPath } from "./constants" import { rootPath } from "./constants"
import { settings } from "./settings" import { settings } from "./settings"
import { isFile } from "./util" import { isFile } from "./util"
import { ipcMain } from "./wrapper"
export class VscodeProvider { export class VscodeProvider {
public readonly serverRootPath: string public readonly serverRootPath: string
@ -16,6 +17,7 @@ export class VscodeProvider {
public constructor() { public constructor() {
this.vsRootPath = path.resolve(rootPath, "lib/vscode") this.vsRootPath = path.resolve(rootPath, "lib/vscode")
this.serverRootPath = path.join(this.vsRootPath, "out/vs/server") this.serverRootPath = path.join(this.vsRootPath, "out/vs/server")
ipcMain.onDispose(() => this.dispose())
} }
public async dispose(): Promise<void> { public async dispose(): Promise<void> {