We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 050cbc2 commit c45a55bCopy full SHA for c45a55b
packages/cursorless-vscode/src/migrateSnippets.ts
@@ -101,6 +101,9 @@ async function readLegacyFile(filePath: string): Promise<SnippetMap> {
101
async function writeCommunityFile(snippetFile: SnippetFile, filePath: string) {
102
const snippetText = serializeSnippetFile(snippetFile);
103
const file = await fs.open(filePath, "wx");
104
- await file.write(snippetText);
105
- await file.close();
+ try {
+ await file.write(snippetText);
106
+ } finally {
107
+ await file.close();
108
+ }
109
}
0 commit comments