diff options
Diffstat (limited to 'editors/code/src/installation')
-rw-r--r-- | editors/code/src/installation/extension.ts | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/editors/code/src/installation/extension.ts b/editors/code/src/installation/extension.ts index f6dd20d82..0d69b8d0c 100644 --- a/editors/code/src/installation/extension.ts +++ b/editors/code/src/installation/extension.ts | |||
@@ -44,10 +44,20 @@ export async function ensureProperExtensionVersion(config: Config): Promise<neve | |||
44 | 44 | ||
45 | const currentExtReleaseDate = config.installedNightlyExtensionReleaseDate.get(); | 45 | const currentExtReleaseDate = config.installedNightlyExtensionReleaseDate.get(); |
46 | 46 | ||
47 | assert(currentExtReleaseDate !== null, "nightly release date must've been set during installation"); | 47 | if (currentExtReleaseDate === null) { |
48 | void vscode.window.showErrorMessage( | ||
49 | "Nightly release date must've been set during the installation. " + | ||
50 | "Did you download and install the nightly .vsix package manually?" | ||
51 | ); | ||
52 | throw new Error("Nightly release date was not set in globalStorage"); | ||
53 | } | ||
48 | 54 | ||
49 | const hoursSinceLastUpdate = diffInHours(currentExtReleaseDate, new Date()); | 55 | const dateNow = new Date; |
50 | log.debug(`Current rust-analyzer nightly was downloaded ${hoursSinceLastUpdate} hours ago`); | 56 | const hoursSinceLastUpdate = diffInHours(currentExtReleaseDate, dateNow); |
57 | log.debug( | ||
58 | "Current rust-analyzer nightly was downloaded", hoursSinceLastUpdate, | ||
59 | "hours ago, namely:", currentExtReleaseDate, "and now is", dateNow | ||
60 | ); | ||
51 | 61 | ||
52 | if (hoursSinceLastUpdate < HEURISTIC_NIGHTLY_RELEASE_PERIOD_IN_HOURS) { | 62 | if (hoursSinceLastUpdate < HEURISTIC_NIGHTLY_RELEASE_PERIOD_IN_HOURS) { |
53 | return; | 63 | return; |