mirror of https://github.com/cirruslabs/tart.git
Make UnsupportedOSError more user-friendly (#192)
* Make UnsupportedOSError more user-friendly * tart prune: allow only specifying a --gc flag
This commit is contained in:
parent
59393df2e1
commit
195a4b3a72
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue