Skip to content

Commit

Permalink
Revert "wmic is deprecated, use powershell to find out the version of…
Browse files Browse the repository at this point in the history
… android studio (react-native-community#1515)"

This reverts commit cddb0c3.
  • Loading branch information
NickGerleman authored Dec 9, 2021
1 parent 89a19ed commit 138f1ab
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 138f1ab

Please sign in to comment.