From 01fc50589d6bf7403b1908387cd1279a22749757 Mon Sep 17 00:00:00 2001 From: Pokey Rule <755842+pokey@users.noreply.github.com> Date: Wed, 17 Jan 2024 15:30:29 +0000 Subject: [PATCH] More tweaks# Please enter the commit message for your changes. Lines starting --- packages/cursorless-engine/src/core/TutorialImpl.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/cursorless-engine/src/core/TutorialImpl.ts b/packages/cursorless-engine/src/core/TutorialImpl.ts index ea58e42a18..937c7fe2c7 100644 --- a/packages/cursorless-engine/src/core/TutorialImpl.ts +++ b/packages/cursorless-engine/src/core/TutorialImpl.ts @@ -37,21 +37,20 @@ export class TutorialImpl implements Tutorial { /** * Handle the argument of a "%%step:cloneStateInk.yml%%"" */ - private async processStep(arg: string, tutorialName: string) { + private async processStep(yamlFilename: string, tutorialName: string) { const tutorialDir = path.join(this.tutorialRootDir, tutorialName); if (!fs.existsSync(tutorialDir)) { throw new Error(`Invalid tutorial name: ${tutorialName}`); } - const yamlFile = path.join(tutorialDir, arg); - if (!fs.existsSync(yamlFile)) { + const yamlPath = path.join(tutorialDir, yamlFilename); + if (!fs.existsSync(yamlPath)) { throw new Error( - `Can't file yaml file: ${yamlFile} in tutorial name: ${tutorialName}`, + `Can't file yaml file: ${yamlPath} in tutorial name: ${tutorialName}`, ); } - const yamlFilename = arg; - const buffer = await readFile(yamlFile); + const buffer = await readFile(yamlPath); const fixture = yaml.load(buffer.toString()) as TestCaseFixture; // command to be said for moving to the next step