mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
This reverts commit 97f8e66d74.
This commit is contained in:
@@ -6,8 +6,9 @@
|
||||
import { window, InputBoxOptions, Uri, Disposable, workspace } from 'vscode';
|
||||
import { IDisposable, EmptyDisposable, toDisposable } from './util';
|
||||
import * as path from 'path';
|
||||
import { IIPCHandler, IIPCServer } from './ipc/ipcServer';
|
||||
import { IIPCHandler, IIPCServer, createIPCServer } from './ipc/ipcServer';
|
||||
import { CredentialsProvider, Credentials } from './api/git';
|
||||
import { OutputChannelLogger } from './log';
|
||||
|
||||
export class Askpass implements IIPCHandler {
|
||||
|
||||
@@ -15,7 +16,16 @@ export class Askpass implements IIPCHandler {
|
||||
private cache = new Map<string, Credentials>();
|
||||
private credentialsProviders = new Set<CredentialsProvider>();
|
||||
|
||||
constructor(private ipc?: IIPCServer) {
|
||||
static async create(outputChannelLogger: OutputChannelLogger, context?: string): Promise<Askpass> {
|
||||
try {
|
||||
return new Askpass(await createIPCServer(context));
|
||||
} catch (err) {
|
||||
outputChannelLogger.logError(`Failed to create git askpass IPC: ${err}`);
|
||||
return new Askpass();
|
||||
}
|
||||
}
|
||||
|
||||
private constructor(private ipc?: IIPCServer) {
|
||||
if (ipc) {
|
||||
this.disposable = ipc.registerHandler('askpass', this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user