diff --git a/src/extension.ts b/src/extension.ts index 92d17c3..3b9d8e5 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -12,14 +12,19 @@ import { isGitUri } from './git/gitUri'; import { getBranchNameWithoutRemote } from './git/models/branch'; import { isCommit } from './git/models/commit'; import { Logger, LogLevel } from './logger'; -import { showDebugLoggingWarningMessage, showInsidersErrorMessage, showWhatsNewMessage } from './messages'; +import { + showDebugLoggingWarningMessage, + showInsidersErrorMessage, + showInsidersExpiredErrorMessage, + showWhatsNewMessage, +} from './messages'; import { registerPartnerActionRunners } from './partners'; import { StorageKeys, SyncedStorageKeys } from './storage'; import { executeCommand, executeCoreCommand, registerCommands } from './system/command'; import { setDefaultDateLocales } from './system/date'; import { once } from './system/event'; import { Stopwatch } from './system/stopwatch'; -import { compare, satisfies } from './system/version'; +import { compare, fromString, satisfies } from './system/version'; import { isViewNode } from './views/nodes/viewNode'; export async function activate(context: ExtensionContext): Promise { @@ -63,6 +68,23 @@ export async function activate(context: ExtensionContext): Promise void showInsidersExpiredErrorMessage(gitlensVersion), 0); + + return undefined; + } + } + if (!workspace.isTrusted) { void setContext(ContextKeys.Untrusted, true); context.subscriptions.push( diff --git a/src/messages.ts b/src/messages.ts index 79e03a9..3485755 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -108,7 +108,13 @@ export function showInsidersErrorMessage() { return showMessage( 'error', 'GitLens (Insiders) cannot be used while GitLens is also enabled. Please ensure that only one version is enabled.', - SuppressedMessages.GitDisabledWarning, + ); +} + +export function showInsidersExpiredErrorMessage(version: string) { + return showMessage( + 'error', + `GitLens (Insiders) version (${version}) has expired. Please install a more recent version.`, ); }