Automattic / hostmgr

A tool for managing macOS VM hosts
Mozilla Public License 2.0
9 stars 3 forks source link

Small output improvements to `vm list` #88

Closed AliSoftware closed 6 months ago

AliSoftware commented 6 months ago

Very small improvements… but that will make our life easier when running some hostmgr vm commands locally

hostmgr vm start

(useful particularly when we don't provide an explicit --handle to vm start and wouldn't otherwise easily know which newly-created handle to subsequently run vm details on)

hostmgr vm list


The result of hostmgr vm list now looks like this in a Terminal:

image
AliSoftware commented 6 months ago

@jkmassel I ended up fixing the vm list file size inconsistency with Finder discussed during our 1:1 after all. We're now printing both Allocated file size (the one that was already printed before, which might account for APFS compression, I guess?) and Total file size (same value as reported by the Finder, and also matches the size used during vm create --disk-size)

🖼️ Look of the new output image
jkmassel commented 6 months ago

To avoid confusion, I'd be fine to just use the total size for everything – is there a good reason not to?

AliSoftware commented 6 months ago

Yeah, basically I added both values while debugging and trying to find the right URLResourceKey to match Finder's, and then figured I'd keep them as I already had the code… but you're probably right that in the end it showing both might be more confusing than helpful.

Fixed in https://github.com/Automattic/hostmgr/pull/88/commits/360cda341b59e4838da2680caad1f3eb80f8743f