Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Sources/mas/Commands/Uninstall.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ extension MAS {
@OptionGroup
private var installedAppIDsOptionGroup: InstalledAppIDsOptionGroup

func validate() throws {
if isUninstallingAll != installedAppIDsOptionGroup.appIDs.isEmpty {
throw ValidationError(
isUninstallingAll
? "Cannot specify both --all & app IDs" // swiftformat:disable:this indent
: "Must specify either --all or at least one app ID",
)
}
}

func run() async throws {
try run(installedApps: try await installedApps)
}
Expand Down
Loading