mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
main: update to use Get-CimInstance as wmic is being deprecated
This commit is contained in:
@@ -1062,9 +1062,8 @@ func findFATMounts(options *compileopts.Options) ([]mountPoint, error) {
|
||||
return points, nil
|
||||
case "windows":
|
||||
// Obtain a list of all currently mounted volumes.
|
||||
cmd := executeCommand(options, "wmic",
|
||||
"PATH", "Win32_LogicalDisk",
|
||||
"get", "DeviceID,VolumeName,FileSystem,DriveType")
|
||||
cmd := executeCommand(options, "powershell", "-c",
|
||||
"Get-CimInstance -ClassName Win32_LogicalDisk | Select-Object DeviceID, DriveType, FileSystem, VolumeName")
|
||||
var out bytes.Buffer
|
||||
cmd.Stdout = &out
|
||||
err := cmd.Run()
|
||||
|
||||
Reference in New Issue
Block a user