From 138f1aba61b7fe20199c7745d748cc2e80402b87 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Wed, 8 Dec 2021 21:16:23 -0800 Subject: [PATCH] Revert "wmic is deprecated, use powershell to find out the version of android studio (#1515)" This reverts commit cddb0c3fb06ef949ea689221c6167147af40e37f. --- packages/cli/src/commands/doctor/healthchecks/androidStudio.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/cli/src/commands/doctor/healthchecks/androidStudio.ts b/packages/cli/src/commands/doctor/healthchecks/androidStudio.ts index 4a7f76923..8c22ec59e 100644 --- a/packages/cli/src/commands/doctor/healthchecks/androidStudio.ts +++ b/packages/cli/src/commands/doctor/healthchecks/androidStudio.ts @@ -26,9 +26,8 @@ export default { 'bin', 'studio.exe', ).replace(/\\/g, '\\\\'); - const powershell = `${process.env.SystemRoot}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`; const {stdout} = await executeCommand( - `${powershell} -Command "& { (Get-ChildItem \\"${androidStudioPath}\\").VersionInfo.FileVersionRaw.ToString() }"`, + `wmic datafile where name="${androidStudioPath}" get Version`, ); const version = stdout.replace(/(\r\n|\n|\r)/gm, '').trim();