mirror of
https://github.com/maxgoedjen/secretive.git
synced 2024-11-24 22:47:06 +00:00
Fix background issue (#217)
This commit is contained in:
parent
f30d1f802f
commit
cd965b9ec6
@ -23,7 +23,9 @@ struct LaunchAgentController {
|
|||||||
Logger().debug("Agent is not running, attempting to force launch")
|
Logger().debug("Agent is not running, attempting to force launch")
|
||||||
let url = Bundle.main.bundleURL.appendingPathComponent("Contents/Library/LoginItems/SecretAgent.app")
|
let url = Bundle.main.bundleURL.appendingPathComponent("Contents/Library/LoginItems/SecretAgent.app")
|
||||||
NSWorkspace.shared.openApplication(at: url, configuration: NSWorkspace.OpenConfiguration()) { app, error in
|
NSWorkspace.shared.openApplication(at: url, configuration: NSWorkspace.OpenConfiguration()) { app, error in
|
||||||
completion?(error == nil)
|
DispatchQueue.main.async {
|
||||||
|
completion?(error == nil)
|
||||||
|
}
|
||||||
if let error = error {
|
if let error = error {
|
||||||
Logger().error("Error force launching \(error.localizedDescription)")
|
Logger().error("Error force launching \(error.localizedDescription)")
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user