Skip to content

Commit 0446616

Browse files
aalejhlshen
andauthored
Fix issue where the VS Code extension outputs a false positive warning message (#7915)
* Fix issue where the VS Code extension outputs a false positive warning message * changelog --------- Co-authored-by: Harold Shen <[email protected]>
1 parent da6056b commit 0446616

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

firebase-vscode/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## NEXT
22

33
- [Fixed] Fixed an issue where Add data and Read data would generate operations in the wrong folder
4+
- [Fixed] Fixed an issue where firebase version check produced false positives on Windows (#7910)
45

56
## 0.10.6
67

firebase-vscode/src/extension.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,15 @@ async function checkCLIInstallation(): Promise<void> {
8989
"latest"
9090
];
9191
const env = { ...process.env, VSCODE_CWD: "" };
92-
const versionRes = spawnSync("firebase", ["--version"], { env });
92+
const versionRes = spawnSync("firebase", ["--version"], {
93+
env,
94+
shell: process.platform === "win32",
95+
});
9396
const currentVersion = semver.valid(versionRes.stdout?.toString());
94-
const npmVersionRes = spawnSync("npm", ["--version"]);
97+
const npmVersionRes = spawnSync("npm", ["--version"], {
98+
env,
99+
shell: process.platform === "win32",
100+
});
95101
const npmVersion = semver.valid(npmVersionRes.stdout?.toString());
96102
if (!currentVersion) {
97103
message = `The Firebase CLI is not installed (or not available on $PATH). If you would like to install it, run ${

0 commit comments

Comments
 (0)