Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
milanvarady committed Dec 26, 2024
1 parent 54d1493 commit a4965c0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Applite/Model/Cask Data/Cask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ final class Cask: Identifiable, Decodable, Hashable, ObservableObject {
/// - Parameters:
/// - force: If `true` install will be run with the `--force` flag
/// - Returns: `Void`
func install(caskData: CaskData, force: Bool = false) async{
func install(caskData: CaskData, force: Bool = false) async {
defer {
resetProgressState(caskData: caskData)
}
Expand Down Expand Up @@ -171,12 +171,14 @@ final class Cask: Identifiable, Decodable, Hashable, ObservableObject {

let arguments: [String] = if zap { ["--zap", self.id] } else { [self.id] }

await runBrewCommand(command: "uninstall",
arguments: arguments,
taskDescription: "Uninstalling",
notificationSuccess: String(localized:"\(self.name) successfully uninstalled"),
notificationFailure: "Failed to uninstall \(self.name)",
onSuccess: { self.isInstalled = false })
await runBrewCommand(
command: "uninstall",
arguments: arguments,
taskDescription: "Uninstalling",
notificationSuccess: String(localized:"\(self.name) successfully uninstalled"),
notificationFailure: "Failed to uninstall \(self.name)",
onSuccess: { self.isInstalled = false }
)
}

/// Updates the cask
Expand Down

0 comments on commit a4965c0

Please sign in to comment.