Skip to content

Commit e7d76f7

Browse files
committed
Always try updating Node version
1 parent 80a6116 commit e7d76f7

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

extensions/ql-vscode/scripts/update-node-version.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { join, resolve } from "path";
22
import { execSync } from "child_process";
3-
import { outputFile, readFile, readJSON } from "fs-extra";
3+
import { outputFile, readJSON } from "fs-extra";
44
import { getVersionInformation } from "./util/vscode-versions";
55
import { fetchJson } from "./util/fetch";
66
import { SemVer } from "semver";
@@ -47,19 +47,7 @@ async function updateNodeVersion() {
4747
`VS Code ${versionInformation.vscodeVersion} uses Electron ${versionInformation.electronVersion} and Node ${versionInformation.nodeVersion}`,
4848
);
4949

50-
let currentNodeVersion = (
51-
await readFile(join(extensionDirectory, ".nvmrc"), "utf8")
52-
).trim();
53-
if (currentNodeVersion.startsWith("v")) {
54-
currentNodeVersion = currentNodeVersion.slice(1);
55-
}
56-
57-
if (currentNodeVersion === versionInformation.nodeVersion) {
58-
console.log("Node version is already up to date");
59-
return;
60-
}
61-
62-
console.log("Node version needs to be updated, updating now");
50+
console.log("Updating files related to the Node version");
6351

6452
await outputFile(
6553
join(extensionDirectory, ".nvmrc"),

0 commit comments

Comments
 (0)