mirror of
https://github.com/cirruslabs/tart.git
synced 2026-10-18 21:47:08 +02:00
Make UnsupportedOSError more user-friendly (#192)
* Make UnsupportedOSError more user-friendly * tart prune: allow only specifying a --gc flag
This commit is contained in:
@@ -20,8 +20,8 @@ struct Prune: AsyncParsableCommand {
|
||||
var gc: Bool = false
|
||||
|
||||
func validate() throws {
|
||||
if olderThan == nil && cacheBudget == nil {
|
||||
throw ValidationError("at least one criteria must be specified")
|
||||
if olderThan == nil && cacheBudget == nil && !gc {
|
||||
throw ValidationError("at least one pruning criteria must be specified")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ struct NoMainScreenFoundError: Error {
|
||||
struct DownloadFailed: Error {
|
||||
}
|
||||
|
||||
struct UnsupportedOSError: Error {
|
||||
struct UnsupportedOSError: Error, CustomStringConvertible {
|
||||
private(set) var description: String = "error: Linux VMs are only supported on macOS 13.0 (Ventura) or newer"
|
||||
}
|
||||
|
||||
struct UnsupportedArchitectureError: Error {
|
||||
|
||||
Reference in New Issue
Block a user