Skip to content

Commit

Permalink
feat(diskutil): Populate devicePath on Mac OS
Browse files Browse the repository at this point in the history
This exposes the device tree path under the `.devicePath` property

Change-type: minor
Signed-off-by: Jonas Hermsmeier <[email protected]>
  • Loading branch information
jhermsmeier committed Aug 2, 2018
1 parent d75c06e commit d736680
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/diskutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const transform = (disk) => {
busType: disk.BusProtocol || 'UNKNOWN',
busVersion: null,
device: disk.DeviceNode,
devicePath: null,
devicePath: disk.DeviceTreePath || null,
raw: disk.DeviceNode && disk.DeviceNode.replace('/disk', '/rdisk'),
description: disk.IORegistryEntryName || disk.MediaName,
error: null,
Expand Down
2 changes: 1 addition & 1 deletion tests/diskutil.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('Drivelist', function() {
busType: 'PCI-Express',
busVersion: null,
device: '/dev/disk1',
devicePath: null,
devicePath: 'IODeviceTree:/PCI0@0/RP17@1B/SSD0@0/IONVMeController',
raw: '/dev/rdisk1',
description: 'Macintosh HD',
error: null,
Expand Down

0 comments on commit d736680

Please sign in to comment.