startosinstall of macoS 10.14 installer or later, its usage says as follows,
--eraseinstall, (Requires APFS) Erase all volumes and install to a new one. Optionally specify the name of the new volume with --newvolumename.
--newvolumename, the name of the volume to be created with --eraseinstall.
--preservecontainer, preserves other volumes in your APFS container when using --eraseinstall.
So, eraseinstall won't work with Mac computer which has HFS Plus boot volume if user try to upgrade from 10.13 or earlier to 10.14 or later.
Consider on preservecontainer option handling.
On current implementation, 0 means not erase and 1 means erase.
So I think we could use more numeric for this option. 2 means erase startup disk but preserve another container
startosinstall
of macoS 10.14 installer or later, its usage says as follows,So,
eraseinstall
won't work with Mac computer which has HFS Plus boot volume if user try to upgrade from 10.13 or earlier to 10.14 or later.Consider on
preservecontainer
option handling. On current implementation,0
meansnot erase
and1
meanserase
. So I think we could use more numeric for this option.2
meanserase startup disk but preserve another container