Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Fix two vm rebase messages

Jackyab441ae4781d
diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineRebaseCommand.swift b/VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineRebaseCommand.swift
index 69aa2490..f41563a0 100644
--- a/VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineRebaseCommand.swift
+++ b/VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineRebaseCommand.swift
@@ -47,8 +47,10 @@ struct VPhoneVirtualMachineRebaseCommand: ParsableCommand {
let target = try lib.library.bundle(named: name)
let base = try VPhoneDiskRebaseBase.resolve(onto, in: lib.library)
if let template = base.commonTemplate(with: target, in: lib.library) {
- let both = base.template == nil ? "\(target.name) and \(base.label) were both cloned from" : "\(target.name) was cloned from"
- print("note: \(both) template \(template) and already share its blocks; expect little to be newly shared")
+ let both = base.template == nil
+ ? "\(target.name) and \(base.label) were both cloned from template \(template) and already share"
+ : "\(target.name) was cloned from template \(template) and already shares"
+ print("note: \(both) its blocks; expect little to be newly shared")
}
let clock = ContinuousClock()
diff --git a/VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift b/VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift
index 394d934d..a38f3e3c 100644
--- a/VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift
+++ b/VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift
@@ -843,7 +843,7 @@ extension VPhoneDiskRebaseError: CustomStringConvertible, LocalizedError {
case let .sameMachine(name):
"Cannot rebase VM '\(name)' onto itself. Name a different VM as the base."
case let .baseNotFound(name):
- "No VM or template named '\(name)'. Name a VM from `vphone-cli vm list` or a template from `vphone-cli vm template list`."
+ "No VM or template named '\(name)'. Name a VM from `vphone-cli vm list`, or a template from `vphone-cli vm template list` by its identifier or a unique prefix of at least four hex digits."
case let .missingImage(machine, path):
"VM '\(machine)' has no disk image at \(path)."
case let .notCloneable(path):