mirror of https://github.com/cirruslabs/tart.git
accept larger disk size (#122)
This commit is contained in:
parent
b16bbf587a
commit
4cc8a9925a
|
|
@ -13,7 +13,7 @@ struct Create: AsyncParsableCommand {
|
|||
var fromIPSW: String?
|
||||
|
||||
@Option(help: ArgumentHelp("Disk size in Gb"))
|
||||
var diskSize: UInt8 = 50
|
||||
var diskSize: UInt16 = 50
|
||||
|
||||
func validate() throws {
|
||||
if fromIPSW == nil {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ struct Set: AsyncParsableCommand {
|
|||
var display: VMDisplayConfig?
|
||||
|
||||
@Option(help: .hidden)
|
||||
var diskSize: UInt8?
|
||||
var diskSize: UInt16?
|
||||
|
||||
func run() async throws {
|
||||
do {
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class VM: NSObject, VZVirtualMachineDelegate, ObservableObject {
|
|||
return expectedIPSWLocation
|
||||
}
|
||||
|
||||
init(vmDir: VMDirectory, ipswURL: URL?, diskSizeGB: UInt8) async throws {
|
||||
init(vmDir: VMDirectory, ipswURL: URL?, diskSizeGB: UInt16) async throws {
|
||||
let ipswURL = ipswURL != nil ? ipswURL! : try await VM.retrieveLatestIPSW();
|
||||
|
||||
// Load the restore image and try to get the requirements
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ struct VMDirectory {
|
|||
try newVMConfig.save(toURL: to.configURL)
|
||||
}
|
||||
|
||||
func resizeDisk(_ sizeGB: UInt8) throws {
|
||||
func resizeDisk(_ sizeGB: UInt16) throws {
|
||||
if !FileManager.default.fileExists(atPath: diskURL.path) {
|
||||
FileManager.default.createFile(atPath: diskURL.path, contents: nil, attributes: nil)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue