Files
tart/Tests/TartTests
Yoshimasa Niwa bb4acb2468 Fix listing VMs when disk capacity is unavailable (#1349)
* Allow HumanReadableByteCount to represent an unknown byte count

Some byte counts, such as the capacity of an ASIF disk image, can't
always be determined. Accept an optional byte count and render an
unknown value as "-" in text output and as null in JSON output.

* Fix listing and getting VMs when disk capacity is unavailable

For ASIF disk images, the disk capacity is read with "diskutil image
info". The command fails with "Resource temporarily unavailable" while
a running VM holds the disk image open. As a result, "tart list" and
"tart get" fail entirely when any such VM exists.

Treat the disk capacity as unknown when it can't be determined, so
that both commands still show the remaining information.

Fixes #1344

* Remove unused VMDirectory.diskSizeGB()

The method was added together with diskSizeBytes() but has never been
used. "tart list" and "tart get" use diskSizeBytes() directly.
2026-09-25 17:08:34 -07:00
..
2026-04-09 21:00:36 -07:00