Skip to content

Commit 0464486

Browse files
committed
update package version + use await in async function
1 parent 2a19e9c commit 0464486

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# What's New?
22

3-
## 1.2.0
3+
## 1.2.1
44
Thank you to the following CMake Tools contributors: koemai, bjosa, emanspeaks, som1lse,
55
dcourtois, tsing80, andy-held, notskm, thezogoth, yokuyuki, dbird137, fabianogk, randshot.
66

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "cmake-tools",
33
"displayName": "CMake Tools",
44
"description": "Extended CMake support in Visual Studio Code",
5-
"version": "1.2.0",
5+
"version": "1.2.1",
66
"publisher": "ms-vscode",
77
"repository": {
88
"type": "git",

src/extension.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,12 +1306,11 @@ class SchemaProvider implements vscode.TextDocumentContentProvider {
13061306
const fileName: string = uri.fsPath;
13071307
const locale: string = util.getLocaleId();
13081308
let localizedFilePath: string = path.join(util.thisExtensionPath(), "dist/schema/", locale, fileName);
1309-
return util.checkFileExists(localizedFilePath).then(fileExists => {
1310-
if (!fileExists) {
1311-
localizedFilePath = path.join(util.thisExtensionPath(), fileName);
1312-
}
1313-
return fs.readFile(localizedFilePath, "utf8");
1314-
});
1309+
const fileExists: boolean = await util.checkFileExists(localizedFilePath);
1310+
if (!fileExists) {
1311+
localizedFilePath = path.join(util.thisExtensionPath(), fileName);
1312+
}
1313+
return fs.readFile(localizedFilePath, "utf8");
13151314
}
13161315
}
13171316

0 commit comments

Comments
 (0)