Skip to content

Commit 461f869

Browse files
authored
Throw error on legacy walkthrough (microsoft#155104)
Remove old walkthrough format
1 parent 9ee8961 commit 461f869

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -364,28 +364,14 @@ export class WalkthroughsService extends Disposable implements IWalkthroughsServ
364364
};
365365
}
366366

367-
// Legacy media config (only in use by remote-wsl at the moment)
367+
// Throw error for unknown walkthrough format
368368
else {
369-
const legacyMedia = step.media as unknown as { path: string; altText: string };
370-
if (typeof legacyMedia.path === 'string' && legacyMedia.path.endsWith('.md')) {
371-
media = {
372-
type: 'markdown',
373-
path: convertExtensionPathToFileURI(legacyMedia.path),
374-
base: convertExtensionPathToFileURI(dirname(legacyMedia.path)),
375-
root: FileAccess.asFileUri(extension.extensionLocation),
376-
};
377-
}
378-
else {
379-
const altText = legacyMedia.altText;
380-
if (altText === undefined) {
381-
console.error('Walkthrough item:', fullyQualifiedID, 'is missing altText for its media element.');
382-
}
383-
media = { type: 'image', altText, path: convertExtensionRelativePathsToBrowserURIs(legacyMedia.path) };
384-
}
369+
throw new Error('Unknown walkthrough format detected for ' + fullyQualifiedID);
385370
}
386371

387372
return ({
388-
description, media,
373+
description,
374+
media,
389375
completionEvents: step.completionEvents?.filter(x => typeof x === 'string') ?? [],
390376
id: fullyQualifiedID,
391377
title: step.title,

0 commit comments

Comments
 (0)