mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 03:23:08 +00:00
Merge pull request #622 from rgoldberg/cleanup
Simplify `open()` extension func for `URL`.
This commit is contained in:
commit
d59249ac33
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