Skip to content

Commit

Permalink
update package version + use await in async function
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbrow committed Nov 7, 2019
1 parent 2a19e9c commit 0464486
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# What's New?

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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cmake-tools",
"displayName": "CMake Tools",
"description": "Extended CMake support in Visual Studio Code",
"version": "1.2.0",
"version": "1.2.1",
"publisher": "ms-vscode",
"repository": {
"type": "git",
Expand Down
11 changes: 5 additions & 6 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1306,12 +1306,11 @@ class SchemaProvider implements vscode.TextDocumentContentProvider {
const fileName: string = uri.fsPath;
const locale: string = util.getLocaleId();
let localizedFilePath: string = path.join(util.thisExtensionPath(), "dist/schema/", locale, fileName);
return util.checkFileExists(localizedFilePath).then(fileExists => {
if (!fileExists) {
localizedFilePath = path.join(util.thisExtensionPath(), fileName);
}
return fs.readFile(localizedFilePath, "utf8");
});
const fileExists: boolean = await util.checkFileExists(localizedFilePath);
if (!fileExists) {
localizedFilePath = path.join(util.thisExtensionPath(), fileName);
}
return fs.readFile(localizedFilePath, "utf8");
}
}

Expand Down

0 comments on commit 0464486

Please sign in to comment.