Skip to content

Commit 0f4fcdf

Browse files
committed
Add comment with PR description
This adds the explanation from the PR description in a comment and removes comment that's no longer helpful.
1 parent ce413a6 commit 0f4fcdf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

extensions/ql-vscode/src/helpers.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,20 @@ export async function prepareCodeTour(): Promise<void> {
276276
if (workspace.workspaceFolders?.length) {
277277
const currentFolder = workspace.workspaceFolders[0].uri.fsPath;
278278

279-
// We need this path to check that the file exists on windows
280279
const tutorialWorkspacePath = join(
281280
currentFolder,
282281
"tutorial.code-workspace",
283282
);
284283
const toursFolderPath = join(currentFolder, ".tours");
285284

285+
/** We're opening the tutorial workspace, if we detect it.
286+
* This will only happen if the following three conditions are met:
287+
* - the .tours folder exists
288+
* - the tutorial.code-workspace file exists
289+
* - the CODESPACES_TEMPLATE setting doesn't exist (it's only set if the user has already opened
290+
* the tutorial workspace so it's a good indicator that the user is in the folder but has ignored
291+
* the prompt to open the workspace)
292+
*/
286293
if (
287294
existsSync(tutorialWorkspacePath) &&
288295
existsSync(toursFolderPath) &&

0 commit comments

Comments
 (0)