mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-22 05:19:03 +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
|
return points, nil
|
||||||
case "windows":
|
case "windows":
|
||||||
// Obtain a list of all currently mounted volumes.
|
// Obtain a list of all currently mounted volumes.
|
||||||
cmd := executeCommand(options, "wmic",
|
cmd := executeCommand(options, "powershell", "-c",
|
||||||
"PATH", "Win32_LogicalDisk",
|
"Get-CimInstance -ClassName Win32_LogicalDisk | Select-Object DeviceID, DriveType, FileSystem, VolumeName")
|
||||||
"get", "DeviceID,VolumeName,FileSystem,DriveType")
|
|
||||||
var out bytes.Buffer
|
var out bytes.Buffer
|
||||||
cmd.Stdout = &out
|
cmd.Stdout = &out
|
||||||
err := cmd.Run()
|
err := cmd.Run()
|
||||||
|
|||||||
Reference in New Issue
Block a user