提交 86bb6326 编写于 作者: C Christof Marti

Show message when Git is not found (#24402)

上级 b4a3fcbf
......@@ -35,10 +35,11 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import { once } from 'vs/base/common/event';
import SCMPreview from 'vs/workbench/parts/scm/browser/scmPreview';
import { isObject } from 'vs/base/common/types';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands';
import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService';
import { Parts, IPartService } from "vs/workbench/services/part/common/partService";
import { IEditorOptions } from "vs/editor/common/config/editorOptions";
import { IMessageService, Severity } from 'vs/platform/message/common/message';
export const WALK_THROUGH_FOCUS = new RawContextKey<boolean>('interactivePlaygroundFocus', false);
......@@ -102,6 +103,7 @@ export class WalkThroughPart extends BaseEditor {
@IContextKeyService private contextKeyService: IContextKeyService,
@IConfigurationService private configurationService: IConfigurationService,
@IModeService private modeService: IModeService,
@IMessageService private messageService: IMessageService,
@IPartService private partService: IPartService
) {
super(WalkThroughPart.ID, telemetryService, themeService);
......@@ -209,6 +211,10 @@ export class WalkThroughPart extends BaseEditor {
from: this.input instanceof WalkThroughInput ? this.input.getTelemetryFrom() : undefined
});
}
if (uri.scheme === 'command' && uri.path === 'git.clone' && !CommandsRegistry.getCommand('git.clone')) {
this.messageService.show(Severity.Info, localize('walkThrough.gitNotFound', "It looks like Git is not installed on your system."));
return;
}
this.openerService.open(this.addFrom(uri));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册