mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 03:23:08 +00:00
Simplify open()
extension func for URL
.
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
parent
7f30214a2d
commit
14dbd26d3a
1 changed files with 4 additions and 4 deletions
|
@ -21,11 +21,11 @@ extension URL {
|
|||
seal.fulfill(())
|
||||
}
|
||||
} else {
|
||||
if NSWorkspace.shared.open(self) {
|
||||
seal.fulfill(())
|
||||
} else {
|
||||
seal.reject(MASError.runtimeError("Failed to open \(self)"))
|
||||
guard NSWorkspace.shared.open(self) else {
|
||||
throw MASError.runtimeError("Failed to open \(self)")
|
||||
}
|
||||
|
||||
seal.fulfill(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue