Make UnsupportedOSError more user-friendly (#192)

* Make UnsupportedOSError more user-friendly

* tart prune: allow only specifying a --gc flag
This commit is contained in:
Nikolay Edigaryev
2022-08-24 15:03:54 -04:00
committed by GitHub
parent 59393df2e1
commit 195a4b3a72
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -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")
}
}
+2 -1
View File
@@ -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 {