mirror of
https://github.com/mas-cli/mas
synced 2025-02-16 12:38:30 +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(())
|
seal.fulfill(())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if NSWorkspace.shared.open(self) {
|
guard NSWorkspace.shared.open(self) else {
|
||||||
seal.fulfill(())
|
throw MASError.runtimeError("Failed to open \(self)")
|
||||||
} else {
|
|
||||||
seal.reject(MASError.runtimeError("Failed to open \(self)"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
seal.fulfill(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue