Skip to content

Commit 6038e1b

Browse files
committed
More cleanup#
1 parent 4ff88ab commit 6038e1b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

packages/cursorless-engine/src/nodeCommon/TalonSpokenFormsJsonReader.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,15 @@ const LATEST_SPOKEN_FORMS_JSON_VERSION = 0;
1818
export class TalonSpokenFormsJsonReader implements TalonSpokenForms {
1919
private disposer = new Disposer();
2020
private notifier = new Notifier();
21-
private cursorlessTalonStateJsonPath;
2221

2322
constructor(private fileSystem: FileSystem) {
24-
this.cursorlessTalonStateJsonPath = fileSystem.cursorlessTalonStateJsonPath;
25-
2623
this.init();
2724
}
2825

2926
private async init() {
30-
const parentDir = path.dirname(this.cursorlessTalonStateJsonPath);
27+
const parentDir = path.dirname(
28+
this.fileSystem.cursorlessTalonStateJsonPath,
29+
);
3130
await mkdir(parentDir, { recursive: true });
3231
this.disposer.push(
3332
this.fileSystem.watchDir(parentDir, () =>
@@ -47,12 +46,12 @@ export class TalonSpokenFormsJsonReader implements TalonSpokenForms {
4746
let payload: TalonSpokenFormsPayload;
4847
try {
4948
payload = JSON.parse(
50-
await readFile(this.cursorlessTalonStateJsonPath, "utf-8"),
49+
await readFile(this.fileSystem.cursorlessTalonStateJsonPath, "utf-8"),
5150
);
5251
} catch (err) {
5352
if (isErrnoException(err) && err.code === "ENOENT") {
5453
throw new NeedsInitialTalonUpdateError(
55-
`Custom spoken forms file not found at ${this.cursorlessTalonStateJsonPath}. Using default spoken forms.`,
54+
`Custom spoken forms file not found at ${this.fileSystem.cursorlessTalonStateJsonPath}. Using default spoken forms.`,
5655
);
5756
}
5857

0 commit comments

Comments
 (0)