accept larger disk size (#122)

This commit is contained in:
Raymond
2022-06-10 09:05:57 -04:00
committed by GitHub
parent b16bbf587a
commit 4cc8a9925a
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -17,7 +17,7 @@ struct Set: AsyncParsableCommand {
var display: VMDisplayConfig?
@Option(help: .hidden)
var diskSize: UInt8?
var diskSize: UInt16?
func run() async throws {
do {
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
}