in internal/diskutil/utility.go [59:72]
func (d *DiskUtilityCmd) Info(ctx context.Context, id string) (string, error) {
// Create the diskutil command for retrieving disk information given a device identifier
// * -plist converts diskutil's output from human-readable to the plist format
// * id - the device identifier for the disk to be fetched
cmdDiskInfo := []string{"diskutil", "info", "-plist", id}
// Execute the diskutil info command and store the output
cmdOut, err := util.ExecuteCommand(ctx, cmdDiskInfo, "", nil, nil)
if err != nil {
return cmdOut.Stdout, fmt.Errorf("diskutil: failed to run diskutil command to fetch disk information, stderr: [%s]: %w", cmdOut.Stderr, err)
}
return cmdOut.Stdout, nil
}