Skip to content

Commit ce7e38e

Browse files
authored
Revert "wmic is deprecated, use powershell to find out the version of android studio (#1515)" (#1517)
This reverts commit cddb0c3.
1 parent 89a19ed commit ce7e38e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/cli/src/commands/doctor/healthchecks/androidStudio.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ export default {
2626
'bin',
2727
'studio.exe',
2828
).replace(/\\/g, '\\\\');
29-
const powershell = `${process.env.SystemRoot}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
3029
const {stdout} = await executeCommand(
31-
`${powershell} -Command "& { (Get-ChildItem \\"${androidStudioPath}\\").VersionInfo.FileVersionRaw.ToString() }"`,
30+
`wmic datafile where name="${androidStudioPath}" get Version`,
3231
);
3332
const version = stdout.replace(/(\r\n|\n|\r)/gm, '').trim();
3433

0 commit comments

Comments
 (0)