src/vs/platform/native/electron-main/nativeHostMainService.ts/NativeHostMainService/uninstallShellCommand
class NativeHostMainService:	async uninstallShellCommand(windowId: number | undefined): Promise<void> {
		const { source } = await this.getShellCommandLink();

		try {
			await Promises.unlink(source);
		} catch (error) {
			switch (error.code) {
				case 'EACCES':
					const { response } = await this.showMessageBox(windowId, {
						title: this.productService.nameLong,
						type: 'info',
						message: localize('warnEscalationUninstall', "{0} will now prompt with 'osascript' for Administrator privileges to uninstall the shell command.", this.productService.nameShort),
						buttons: [
							mnemonicButtonLabel(localize({ key: 'ok', comment: ['&& denotes a mnemonic'] }, "&&OK")),
							mnemonicButtonLabel(localize({ key: 'cancel', comment: ['&& denotes a mnemonic'] }, "&&Cancel")),
						],
						noLink: true,
						defaultId: 0,
						cancelId: 1
					});

					if (response === 0 /* OK */) {
						try {
							const command = `osascript -e "do shell script \\"rm \'${source}\'\\" with administrator privileges"`;
							await promisify(exec)(command);
						} catch (error) {
							throw new Error(localize('cantUninstall', "Unable to uninstall the shell command '{0}'.", source));
						}
					}
					break;
				case 'ENOENT':
					break; // ignore file not found
				default:
					throw error;
			}
		}
	}