Simplify open() extension func for URL.

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
Ross Goldberg 2024-10-28 12:34:18 -04:00
parent 7f30214a2d
commit 14dbd26d3a
No known key found for this signature in database

View file

@ -21,11 +21,11 @@ extension URL {
seal.fulfill(())
}
} else {
if NSWorkspace.shared.open(self) {
guard NSWorkspace.shared.open(self) else {
throw MASError.runtimeError("Failed to open \(self)")
}
seal.fulfill(())
} else {
seal.reject(MASError.runtimeError("Failed to open \(self)"))
}
}
}
}